Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi select is stopping event propogation #248

Open
anujs099 opened this issue Apr 24, 2024 · 2 comments
Open

Multi select is stopping event propogation #248

anujs099 opened this issue Apr 24, 2024 · 2 comments

Comments

@anujs099
Copy link

Hello @jameskerr ,

I am facing a issue , onClick i am selecting nodes (selectMulti) , since the shift key is down the event propogation is stopped and preventing my component(contextMenu) from opening up.

please suggest a solution or a work around this issue , thanks !

@seancheno
Copy link

Wow, I am just now experiencing a similar issue.

If I have rendered the tree component, then elsewhere in our app, this event is no longer firing

useEffect(() => {
const handleDragEndGlobal = () => {
handleDragEnd()
}

document.addEventListener('dragend', handleDragEndGlobal)

return () => {
  document.removeEventListener('dragend', handleDragEndGlobal)
}

}, [])

Why is rendering the tree component preventing this event to no longer fire? Thank you for any info.

@seancheno
Copy link

seancheno commented Apr 25, 2024

Not sure if this will fix your issue, but it fixed my above issue - see - #17

Specifically in my case, using the tree's parent as the element to pass as the root element for the dndRootElement prop

  <div ref={treeContainerRef} className="relative flex h-full min-h-0 flex-col "> {treeContainerRef.current && ( <Tree dndRootElement={treeContainerRef.current} ref={treeRef} data={treeData} // etc. > {HierarchyPanelTreeNode} </Tree> )} </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants