refactor(wrapNode): one pass id and type to select action

This commit is contained in:
moklick
2020-07-15 18:32:45 +02:00
parent 989aaf8510
commit c659c094dd
+1 -1
View File
@@ -238,7 +238,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
const onSelectNodeHandler = useCallback(() => {
if (!isDraggable && isSelectable) {
setSelectedElements({ id, type } as Node);
setSelectedElements({ id: node.id, type: node.type } as Node);
if (onClick) {
onClick(node);