message: Fix onClick handler for draggable nodes
diff: @@ -58,6 +58,7 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
  noPanClassName,
  noDragClassName,
  }: WrapNodeProps) => {
  + const [dragging, setDragging] = useState(false);
  const store = useStoreApi();
  const { addSelectedNodes, unselectNodesAndEdges, updateNodePosition, updateNodeDimensions } = useStore(
  selector,
  @@ -86,7 +87,6 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
  const onSelectNodeHandler = useCallback(
  (event: MouseEvent) => {
  - if (!isDraggable) {
  if (isSelectable) {
  store.setState({ nodesSelectionActive: false });
  @@ -99,9 +99,8 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
  const node = store.getState().nodeInternals.get(id)!;
  onClick(event, { ...node });
  }
  - }
  },
  - [isSelectable, selected, isDraggable, onClick, id]
  + [isSelectable, selected, onClick, id]
  );
  const onDragStart = useCallback(
  @@ -130,9 +129,6 @@ export default (NodeComponent: ComponentType<NodeProps>) => {
  [id, selected, selectNodesOnDrag, isSelectable, onNodeDragStart]
  );
  - // As one of the props passed to a custom node
  - const [dragging, setDragging] = useState(false);
  -
  const onDrag = useCallback(
  (event: UseDragEvent, dragPos: UseDragData) => {
  updateNodePosition({ id, diff: { x: dragPos.dx, y: dragPos.dy } });
  