-
-
Notifications
You must be signed in to change notification settings - Fork 445
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: #718 dragend don't fire on virtualization #719
fix: #718 dragend don't fire on virtualization #719
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'm new to github actions, can somebody tell me why it when wrong at Checkout Repository step? What should I do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, good solutions proposed, going to optimize a bit before merging.
@@ -146,6 +149,15 @@ export const MRT_TableBody = <TData extends Record<string, any>>({ | |||
rowPinning, | |||
]); | |||
|
|||
const draggingRowIndex = rows.findIndex((row) => row.id === draggingRow?.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might introduce some performance overhead
@@ -93,6 +94,10 @@ export const MRT_Table = <TData extends Record<string, any>>({ | |||
[columnPinning, enableColumnVirtualization, enableColumnPinning], | |||
); | |||
|
|||
const draggingColumnIndex = table | |||
.getVisibleLeafColumns() | |||
.findIndex((c) => c.id === draggingColumn?.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another scanning of all rows potentially on every render, even if no dragging is occurring or the dragging features are not enabled
#718
use
rangeExtractor
to keepdraggingRow
ordraggingColumn
in document.