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

Improve the parameters of onDragDrop callback on Tree #1020

Closed
AlexTo opened this issue Sep 24, 2019 · 1 comment
Closed

Improve the parameters of onDragDrop callback on Tree #1020

AlexTo opened this issue Sep 24, 2019 · 1 comment
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@AlexTo
Copy link

AlexTo commented Sep 24, 2019

Hi, I'm using Primereact tree dragdrop feature. So far I can get new tree structure after dropping the node using onDragDrop. But how to get source and target node?

It will be very tricky if I have to compare old tree structure and new tree structure to figure out which node has been moved.

https://www.primefaces.org/primereact/#/tree/dragdrop

Thank you

@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Feb 9, 2021
@mertsincan mertsincan added this to the 6.1.0 milestone Feb 9, 2021
@mertsincan mertsincan changed the title Tree DragDrop how to get source and target node? Improve the parameters of onDragDrop callback on Tree Mar 5, 2021
@mertsincan mertsincan self-assigned this Mar 5, 2021
@mertsincan
Copy link
Member

Hi,

Fixed for 6.1.0. You can use onDragDrop callback to access this info.

onDragDrop?(e: {originalEvent: Event, value: any, dragNode: any, dropNode: any, dropIndex: number}): void;

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants