mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-12-23 22:41:18 +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 MethodProps = {
|
||||
name: string;
|
||||
parentPath: string;
|
||||
fullAccessPath: string;
|
||||
docString?: string;
|
||||
addNotification: (message: string, levelname?: LevelName) => void;
|
||||
displayName: string;
|
||||
@@ -15,7 +14,7 @@ type MethodProps = {
|
||||
};
|
||||
|
||||
export const MethodComponent = React.memo((props: MethodProps) => {
|
||||
const { name, parentPath, docString, addNotification, displayName, id } = props;
|
||||
const { fullAccessPath, docString, addNotification, displayName, id } = props;
|
||||
|
||||
// Conditional rendering based on the 'render' prop.
|
||||
if (!props.render) {
|
||||
@@ -24,7 +23,6 @@ export const MethodComponent = React.memo((props: MethodProps) => {
|
||||
|
||||
const renderCount = useRef(0);
|
||||
const formRef = useRef(null);
|
||||
const fullAccessPath = [parentPath, name].filter((element) => element).join('.');
|
||||
|
||||
const triggerNotification = () => {
|
||||
const message = `Method ${fullAccessPath} was triggered.`;
|
||||
|
||||
Reference in New Issue
Block a user