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

DataTable: Reorder for the last row give wrong dropIndex #6996

Closed
TwilightOwl opened this issue Aug 6, 2024 · 0 comments · Fixed by #7022 · May be fixed by leoo1992/GeradorQRCode#95
Closed

DataTable: Reorder for the last row give wrong dropIndex #6996

TwilightOwl opened this issue Aug 6, 2024 · 0 comments · Fixed by #7022 · May be fixed by leoo1992/GeradorQRCode#95
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@TwilightOwl
Copy link

Describe the bug

If you try to drop the last row right below the pre last row you will get wrong dropIndex.

Reproducer

https://stackblitz.com/edit/optnbv?file=src%2FApp.jsx

System Information

primereact: 10.8.0
react: 18.3.1

Steps to reproduce the behavior

Go to the section Reorder of DataTable in official documentation. Try to move the last row right below the pre last one.
Снимок экрана 2024-08-07 в 03 27 54

You will get dropIndex: 3 and data will be reordered.

Expected behavior

dropIndex is 4 and data is unchanged.

@TwilightOwl TwilightOwl added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 6, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 6, 2024
@melloware melloware added this to the 10.8.3 milestone Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
2 participants