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: #718 dragend don't fire on virtualization #719

Conversation

YongThePsibor
Copy link
Contributor

#718
use rangeExtractor to keep draggingRow or draggingColumn in document.

@vercel
Copy link

vercel bot commented Oct 8, 2023

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

Name Status Preview Comments Updated (UTC)
material-react-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2023 3:23am
material-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2023 3:23am

@YongThePsibor
Copy link
Contributor Author

I'm new to github actions, can somebody tell me why it when wrong at Checkout Repository step? What should I do?

Copy link
Owner

@KevinVandy KevinVandy left a 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);
Copy link
Owner

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);
Copy link
Owner

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

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.

2 participants