mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
frontend components pass actual readOnly and docString values to backend
This commit is contained in:
parent
e4f5374783
commit
31f280c9cb
@ -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]) => (
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -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) => {
|
||||
<NumberComponent
|
||||
isInstantUpdate={isInstantUpdate}
|
||||
fullAccessPath={`${fullAccessPath}.value`}
|
||||
docString=""
|
||||
docString={docString}
|
||||
readOnly={valueReadOnly}
|
||||
type="float"
|
||||
value={valueMagnitude}
|
||||
|
@ -59,7 +59,8 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
||||
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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user