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,
|
enum: enumDict,
|
||||||
value: event.target.value,
|
value: event.target.value,
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: attribute.readonly,
|
||||||
|
doc: attribute.doc
|
||||||
})
|
})
|
||||||
}>
|
}>
|
||||||
{Object.entries(enumDict).map(([key, val]) => (
|
{Object.entries(enumDict).map(([key, val]) => (
|
||||||
|
@ -249,7 +249,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
type: type,
|
type: type,
|
||||||
value: Number(newValue),
|
value: Number(newValue),
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: readOnly,
|
||||||
|
doc: docString
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -263,7 +264,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
type: type,
|
type: type,
|
||||||
value: Number(newValue),
|
value: Number(newValue),
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: readOnly,
|
||||||
|
doc: docString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +282,8 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => {
|
|||||||
type: type,
|
type: type,
|
||||||
value: Number(inputString),
|
value: Number(inputString),
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: readOnly,
|
||||||
|
doc: docString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -68,7 +68,8 @@ export const SliderComponent = React.memo((props: SliderComponentProps) => {
|
|||||||
type: value.type,
|
type: value.type,
|
||||||
value: newNumber,
|
value: newNumber,
|
||||||
full_access_path: `${fullAccessPath}.value`,
|
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
|
<NumberComponent
|
||||||
isInstantUpdate={isInstantUpdate}
|
isInstantUpdate={isInstantUpdate}
|
||||||
fullAccessPath={`${fullAccessPath}.value`}
|
fullAccessPath={`${fullAccessPath}.value`}
|
||||||
docString=""
|
docString={docString}
|
||||||
readOnly={valueReadOnly}
|
readOnly={valueReadOnly}
|
||||||
type="float"
|
type="float"
|
||||||
value={valueMagnitude}
|
value={valueMagnitude}
|
||||||
|
@ -59,7 +59,8 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
type: 'str',
|
type: 'str',
|
||||||
value: inputString,
|
value: inputString,
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: readOnly,
|
||||||
|
doc: docString
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
@ -71,7 +72,8 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
type: 'str',
|
type: 'str',
|
||||||
value: inputString,
|
value: inputString,
|
||||||
full_access_path: fullAccessPath,
|
full_access_path: fullAccessPath,
|
||||||
readonly: true
|
readonly: readOnly,
|
||||||
|
doc: docString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user