material-react-table icon indicating copy to clipboard operation
material-react-table copied to clipboard

Row ordering with sorting

Open ktriek opened this issue 1 year ago • 2 comments

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

  • [X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

ktriek avatar Sep 10 '24 13:09 ktriek

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

KevinVandy avatar Sep 10 '24 13:09 KevinVandy

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).

ktriek avatar Sep 10 '24 13:09 ktriek