mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-12 15:57:12 +02:00
adds DictComponent to GenericComponent
This commit is contained in:
@ -14,6 +14,7 @@ import { LevelName } from './NotificationsComponent';
|
|||||||
import { getIdFromFullAccessPath } from '../utils/stringUtils';
|
import { getIdFromFullAccessPath } from '../utils/stringUtils';
|
||||||
import { WebSettingsContext } from '../WebSettings';
|
import { WebSettingsContext } from '../WebSettings';
|
||||||
import { updateValue } from '../socket';
|
import { updateValue } from '../socket';
|
||||||
|
import { DictComponent } from './DictComponent';
|
||||||
|
|
||||||
type AttributeType =
|
type AttributeType =
|
||||||
| 'str'
|
| 'str'
|
||||||
@ -22,6 +23,7 @@ type AttributeType =
|
|||||||
| 'int'
|
| 'int'
|
||||||
| 'Quantity'
|
| 'Quantity'
|
||||||
| 'list'
|
| 'list'
|
||||||
|
| 'dict'
|
||||||
| 'method'
|
| 'method'
|
||||||
| 'DataService'
|
| 'DataService'
|
||||||
| 'DeviceConnection'
|
| 'DeviceConnection'
|
||||||
@ -212,6 +214,16 @@ export const GenericComponent = React.memo(
|
|||||||
id={id}
|
id={id}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
} else if (attribute.type === 'dict') {
|
||||||
|
return (
|
||||||
|
<DictComponent
|
||||||
|
value={attribute.value as Record<string, SerializedValue>}
|
||||||
|
docString={attribute.doc}
|
||||||
|
isInstantUpdate={isInstantUpdate}
|
||||||
|
addNotification={addNotification}
|
||||||
|
id={id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else if (attribute.type === 'Image') {
|
} else if (attribute.type === 'Image') {
|
||||||
return (
|
return (
|
||||||
<ImageComponent
|
<ImageComponent
|
||||||
|
Reference in New Issue
Block a user