feat: adding instant_update switch

This commit is contained in:
Mose Müller
2023-08-02 12:06:22 +02:00
parent 80fe1051f1
commit 5cb30688cf
7 changed files with 80 additions and 28 deletions

View File

@ -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}
/>
);
})}