KevinVandy / material-react-table

A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript
https://material-react-table.com
MIT License
1.48k stars 421 forks source link

Row ordering with sorting #1241

Open ktriek opened 1 week ago

ktriek commented 1 week ago

material-react-table version

2 and 3 at least

react & react-dom versions

17

Describe the bug and the steps to reproduce it

The draggingRow.index and hoveredRow.index are wrong when the table was previoulsy sorted on the first drop. Future drops work as expected.

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/edit/github-r7odah?file=src%2FTS.tsx

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

None

Terms

KevinVandy commented 1 week ago

I usually assume that the sorting features should be turned off in MRT if you are enabling row ordering

ktriek commented 1 week ago

Yeah, that's what I understood from the storybooks, but we have this requirement, the users can sort by columns headers or customize the order(DnD).