question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pass children to Handle component cause the Handle not being abled to drag

See original GitHub issue

my code

<Handle
      type="source"
      position={Position.Right}
      id={id}
    >
    <IconPlus style={{ opacity: disabled ? 0.2 : 1, zIndex: -1 }} />
</Handle>

when i add a source or target class to its children, it works ok

<Handle
      type="source"
      position={Position.Right}
      id={id}
    >
    <IconPlus class="source" style={{ opacity: disabled ? 0.2 : 1, zIndex: -1 }} />
</Handle>

after digging into the source code, i found this image i am not sure if this is a feature or bug, i think most users may expect the children can respond to users’ drag action

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fengChongxiucommented, Dec 29, 2021

were you able to resolve the issue

just by setting pointer-event to none to handle’s children

0reactions
cliffordfajardocommented, Dec 28, 2021

@fengChongxiu - were you able to resolve the issue? Could you share a small codesandbox.io example so other’s can take a look as well?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How passing props to component works in React
Master how to pass props (properties) to components in React with this useful beginner's guide, including demo code.
Read more >
cdkDragHandle doesn't work inside child component
I have an item inside it (drag-handle) which also takes the full width and height of the container, that contains an image (just...
Read more >
Higher-Order Components - React
A higher-order component (HOC) is an advanced technique in React for reusing component logic. HOCs are not part of the React API, per...
Read more >
Event Bubbling and Event Catching in JavaScript and React
Once an inner child element's event is called, all elements above/below it will also be called (bubbling/capturing). To stop this from happening ...
Read more >
Optimizing React performance by preventing unnecessary re ...
Only re-rendering React components when necessary can make app your faster. This article explains how to reduce re-renders and avoid common ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found