diff --git a/frontend/src/components/EnumComponent.tsx b/frontend/src/components/EnumComponent.tsx index a8f9604..aaa23a5 100644 --- a/frontend/src/components/EnumComponent.tsx +++ b/frontend/src/components/EnumComponent.tsx @@ -91,7 +91,8 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => { enum: enumDict, value: event.target.value, full_access_path: fullAccessPath, - readonly: true + readonly: attribute.readonly, + doc: attribute.doc }) }> {Object.entries(enumDict).map(([key, val]) => ( diff --git a/frontend/src/components/NumberComponent.tsx b/frontend/src/components/NumberComponent.tsx index 9504e94..63db924 100644 --- a/frontend/src/components/NumberComponent.tsx +++ b/frontend/src/components/NumberComponent.tsx @@ -249,7 +249,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => { type: type, value: Number(newValue), full_access_path: fullAccessPath, - readonly: true + readonly: readOnly, + doc: docString }); return; } else { @@ -263,7 +264,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => { type: type, value: Number(newValue), full_access_path: fullAccessPath, - readonly: true + readonly: readOnly, + doc: docString }); } @@ -280,7 +282,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => { type: type, value: Number(inputString), full_access_path: fullAccessPath, - readonly: true + readonly: readOnly, + doc: docString }); } }; diff --git a/frontend/src/components/SliderComponent.tsx b/frontend/src/components/SliderComponent.tsx index 5cb003e..55f9517 100644 --- a/frontend/src/components/SliderComponent.tsx +++ b/frontend/src/components/SliderComponent.tsx @@ -68,7 +68,8 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => { type: value.type, value: newNumber, full_access_path: `${fullAccessPath}.value`, - readonly: value.readonly + readonly: value.readonly, + doc: docString }); }; @@ -141,7 +142,7 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => { { type: 'str', value: inputString, full_access_path: fullAccessPath, - readonly: true + readonly: readOnly, + doc: docString }); event.preventDefault(); } @@ -71,7 +72,8 @@ export const StringComponent = React.memo((props: StringComponentProps) => { type: 'str', value: inputString, full_access_path: fullAccessPath, - readonly: true + readonly: readOnly, + doc: docString }); } };