First node dropped into empty tree not triggering onNodeDrop #9991
Labels
LTS-FIXED-9.2.5
Fixed in PrimeNG LTS 9.2.5
LTS-FIXED-10.1.0
Fixed in PrimeNG LTS 10.1.0
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/primeng-treedragdrop-demo-ws7uey?file=src%2Fapp%2Fapp.component.ts
Current behavior
Given that there are no nodes within a (droppable) target tree,
When a node is dragged and dropped into the previously empty target tree,
Then the target tree's onNodeDrop function is NOT called.
(The onNodeDrop function IS called when there are already nodes in the target tree.)
Expected behavior
Given that there are no nodes within a (droppable) target tree,
When a node is dragged and dropped into the previously empty target tree,
Then the target tree's onNodeDrop function IS called (as with subsequent drops).
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
We have validation and transformation logic with a function that listens to the onNodeDrop events. But this is not occurring for the first drop.
Please tell us about your environment:
Angular version: 11.2.4
PrimeNG version: 11.3.0
Browser: Chrome 88.0.4324.190 (only one checked so far)
Language: TypeScript 4.0.5, module: es2020, target: es2015
Node (for AoT issues):
node --version
= 14.5.3The text was updated successfully, but these errors were encountered: