UITreeNode: onDropPoint
should execute even when props.node.droppable === false
.
#6976
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
When there's a node with
droppable: false
, the drop point before said node will render and be active (which is correct), but if you drop another node on said drop point, it will not callonDragDrop
and the drop point will remainactive
(both of which are incorrect).Simply removing line
primereact/components/lib/tree/UITreeNode.js
Line 612 in eef0068
Reproducer
No response
System Information
System:
OS: macOS 14.6
CPU: (16) arm64 Apple M3 Max
Memory: 338.42 MB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.9.0 - /nix/store/wz7pf9yhmby97729pmgyrlxvyfpds16y-devshell-dir/bin/node
Yarn: 1.22.19 - /nix/store/wz7pf9yhmby97729pmgyrlxvyfpds16y-devshell-dir/bin/yarn
npm: 8.19.1 - /nix/store/wz7pf9yhmby97729pmgyrlxvyfpds16y-devshell-dir/bin/npm
Browsers:
Chrome: 127.0.6533.89
Safari: 17.6
npmPackages:
primereact: ~10.7.0 => 10.7.0
react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
Have a
Tree
with at least 2TreeNode
s, one of which hasdroppable: false
. Try to drop another node into the drop point just before the node withdroppable: false
. TheTree
'sonDragDrop
will not fire and the drop point will remain active even when the mouse button is released.Expected behavior
I would have expected to be able to drop nodes before a node with
droppable: false
, even if dropping into it is disabled.The text was updated successfully, but these errors were encountered: