Skip to content

Commit

Permalink
fix(free-demo): node panel inject onAdd node json
Browse files Browse the repository at this point in the history
  • Loading branch information
louisyoungx committed Feb 28, 2025
1 parent ee8b01c commit 651b821
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/demo-free-layout/src/components/node-panel/node-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ export const NodeList: FC<NodeListProps> = (props) => {
const { onSelect } = props;
const context = useClientContext();
const handleClick = (e: React.MouseEvent, registry: FlowNodeRegistry) => {
const json = registry.onAdd?.(context);
onSelect({
nodeType: registry.type as string,
selectEvent: e,
nodeJSON: json,
});
};
return (
Expand Down

0 comments on commit 651b821

Please sign in to comment.