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

fix DataTable: Allow drop below bottom row #6424

Merged

Conversation

philipstarkey
Copy link
Contributor

@philipstarkey philipstarkey commented Sep 18, 2024

Fixes #6014 by removing the double counting of the page scroll position.

The getOffset() utility function already includes the window's scroll position (see here). Double counting the scroll offset meant that the DataTable onRowDragOver event handler always thought we were on the top-half of the row, preventing the indicator from being shown at the bottom of the row.

Fixes primefaces#6014 by removing the double counting of the page scroll position.

The `getOffset()` utility function already includes the window's scroll position (see [here](https://github.com/primefaces/primeuix/blob/20388c576629d62cc9625ba87c1975aba78f85ef/packages/utils/src/dom/methods/getOffset.ts#L6-L7)). Double counting the scroll offset meant that the DataTable `onRowDragOver` event handler always through we were on the top-half of the row, preventing the indicator from being shown at the bottom of the row.
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Sep 18, 2024 2:10am
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Sep 18, 2024 2:10am

@philipstarkey philipstarkey changed the title DataTable: Allow drop below bottom row fix DataTable: Allow drop below bottom row Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataTable: reorder with drag and drop not working as expected
2 participants