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

First node dropped into empty tree not triggering onNodeDrop #9991

Closed
leifjones opened this issue Mar 11, 2021 · 1 comment
Closed

First node dropped into empty tree not triggering onNodeDrop #9991

leifjones opened this issue Mar 11, 2021 · 1 comment
Assignees
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

Comments

@leifjones
Copy link

leifjones commented Mar 11, 2021

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/primeng-treedragdrop-demo-ws7uey?file=src%2Fapp%2Fapp.component.ts
2021-03-11-no-trigger-on-drop-into-empty-tree

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

  1. Configure:
  • a droppable tree with no initial treenodes, and a function listening to the onNodeDrop event
  • a second draggable tree with treenodes
  1. Load page
  2. Drag a node from the source tree to the target tree
  3. Note that the listening function is not triggered for the first drop

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.3

@yigitfindikli yigitfindikli added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE labels Mar 12, 2021
@yigitfindikli yigitfindikli self-assigned this Mar 12, 2021
@yigitfindikli yigitfindikli added this to the 11.3.2 milestone Mar 12, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 and removed LTS-PORTABLE labels Mar 15, 2021
@leifjones
Copy link
Author

@yigitfindikli We're respectfully curious - so we can decide whether to code around this bug: How soon might the 11.3.2 release occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants