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 with drag and drop not working as expected #6014

Closed
Huc91 opened this issue Jul 5, 2024 · 2 comments · Fixed by #6424
Closed

DataTable: reorder with drag and drop not working as expected #6014

Huc91 opened this issue Jul 5, 2024 · 2 comments · Fixed by #6424
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue3-portable
Milestone

Comments

@Huc91
Copy link

Huc91 commented Jul 5, 2024

Describe the bug

The bug is visible even in your docs: https://primevue.org/datatable/#reorder.
When I try to drag a row that is not the last to be the last, I'm unable to do it. It can only be second to last.

Reproducer

I have a video

PrimeVue version

3.52.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 126

Steps to reproduce the behavior

  1. Have DataTable with some rows and the reorder, like in the docs: https://primevue.org/datatable/#reorder.
  2. Choose a row to drag to reorder that is not the last one.
  3. Try to make it become the last one by dragging it at the bottom
  4. You are unable to do it. It can only become second to last.
s-r.mov

Expected behavior

Able to reorder all the rows, and be able to put a row as lat

@Huc91 Huc91 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 5, 2024
@Huc91
Copy link
Author

Huc91 commented Sep 3, 2024

Any news on this? I checked v4 of PrimeVue and it's still present.

@philipstarkey
Copy link
Contributor

I've put in a PR for the fix for this (#6424). The issue is actually dependent on scroll position, as the scroll height is being double counted.

A reproduction is available here: https://stackblitz.com/edit/81ag1m?file=src%2FApp.vue

The first table at the top of the page allows you to drop at the end of the list.
The second table at the bottom of the page (once you scroll down) does not allow you to drop at the end of the list.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 24, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.1.0 milestone Sep 24, 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 bug related to a specific component. Something about the component is not working vue3-portable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants