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

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