mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-02-19 16:38:39 +01:00
passing fullAccessPath instead of parentPath and name
This commit is contained in:
@@ -5,8 +5,7 @@ import { DocStringComponent } from './DocStringComponent';
|
||||
import { LevelName } from './NotificationsComponent';
|
||||
|
||||
type AsyncMethodProps = {
|
||||
name: string;
|
||||
parentPath: string;
|
||||
fullAccessPath: string;
|
||||
value: 'RUNNING' | null;
|
||||
docString?: string;
|
||||
hideOutput?: boolean;
|
||||
@@ -18,8 +17,7 @@ type AsyncMethodProps = {
|
||||
|
||||
export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
||||
const {
|
||||
name,
|
||||
parentPath,
|
||||
fullAccessPath,
|
||||
docString,
|
||||
value: runningTask,
|
||||
addNotification,
|
||||
@@ -34,7 +32,8 @@ export const AsyncMethodComponent = React.memo((props: AsyncMethodProps) => {
|
||||
|
||||
const renderCount = useRef(0);
|
||||
const formRef = useRef(null);
|
||||
const fullAccessPath = [parentPath, name].filter((element) => element).join('.');
|
||||
const name = fullAccessPath.split('.').at(-1);
|
||||
const parentPath = fullAccessPath.slice(0, -(name.length + 1));
|
||||
|
||||
useEffect(() => {
|
||||
renderCount.current++;
|
||||
|
||||
Reference in New Issue
Block a user