mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-12 07:57:11 +02:00
feat: adding instant_update switch
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { DocStringComponent } from './DocStringComponent';
|
||||
import { GenericComponent } from './GenericComponent';
|
||||
import { Attribute, GenericComponent } from './GenericComponent';
|
||||
|
||||
interface ListComponentProps {
|
||||
name: string;
|
||||
parent_path?: string;
|
||||
value: object[];
|
||||
value: Attribute[];
|
||||
docString: string;
|
||||
isInstantUpdate: boolean;
|
||||
}
|
||||
|
||||
export const ListComponent = React.memo((props: ListComponentProps) => {
|
||||
@ -16,7 +17,7 @@ export const ListComponent = React.memo((props: ListComponentProps) => {
|
||||
renderCount.current++;
|
||||
});
|
||||
|
||||
const { name, parent_path, value, docString } = props;
|
||||
const { name, parent_path, value, docString, isInstantUpdate } = props;
|
||||
|
||||
return (
|
||||
<div className={'component list'} id={parent_path.concat(name)}>
|
||||
@ -31,6 +32,7 @@ export const ListComponent = React.memo((props: ListComponentProps) => {
|
||||
attribute={item}
|
||||
name={`${name}[${index}]`}
|
||||
parentPath={parent_path}
|
||||
isInstantUpdate={isInstantUpdate}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
Reference in New Issue
Block a user