Skip to content
Snippets Groups Projects
Commit c319dd16 authored by chris's avatar chris
Browse files

fix dropDown disabled

parent dfbb883a
No related branches found
No related tags found
1 merge request!368Overlay
......@@ -39,8 +39,10 @@ const t = `<p class="paragraph"></p>
const Hhmi = () => {
const [submited, isSubmited] = useState(false);
const [readOnly, isReadOnly] = useState(false);
const submitQuestions = () => {
isSubmited(true);
isReadOnly(true);
};
return (
......@@ -52,7 +54,7 @@ const Hhmi = () => {
customValues={{ showFeedBack: submited }}
fileUpload={file => renderImage(file)}
value={t}
// readonly
readonly={readOnly}
layout={HhmiLayout}
onChange={source => console.log(source)}
/>
......
......@@ -48,6 +48,9 @@ const DropComponent = ({ title, view, tools }) => {
const { state } = view;
const [label, setLabel] = useState(null);
const isEditable = main.props.editable(editable => {
return editable;
});
const dropDownOptions = [
{
......@@ -83,7 +86,8 @@ const DropComponent = ({ title, view, tools }) => {
});
}, [activeViewId]);
const isDisabled = tools[0].select(state, activeView);
let isDisabled = tools[0].select(state, activeView);
if (!isEditable) isDisabled = false;
const onChange = option => {
tools[option.value].run(main, context);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment