mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
fixes readonly coloured enum
This commit is contained in:
parent
dfe543067f
commit
f5e108bbe5
@ -69,7 +69,12 @@ export const EnumComponent = React.memo((props: EnumComponentProps) => {
|
|||||||
{readOnly ? (
|
{readOnly ? (
|
||||||
// Display the Form.Control when readOnly is true
|
// Display the Form.Control when readOnly is true
|
||||||
<Form.Control
|
<Form.Control
|
||||||
value={enumDict[enumValue]}
|
style={
|
||||||
|
attribute.type == 'ColouredEnum'
|
||||||
|
? { backgroundColor: enumDict[enumValue] }
|
||||||
|
: {}
|
||||||
|
}
|
||||||
|
value={attribute.type == 'ColouredEnum' ? enumValue : enumDict[enumValue]}
|
||||||
name={fullAccessPath}
|
name={fullAccessPath}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user