KevinVandy/material-react-table

onSortingChange getting called twice on first render (reopened)

Xavier9922 opened this issue · 1 comments

material-react-table version

v2.13.0

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

When creating a simple table and use the onSortingChange prop the callback is getting fired twice.
This was mentioned at #1079
We followed recommendation, but the issue persists

Minimal, Reproducible Example - (Optional, but Recommended)

https://codesandbox.io/p/devbox/tender-sea-89wm26?workspaceId=ca490667-ce10-4765-a608-13d7885b0840

Screenshots or Videos (Optional)

Screen.Recording.2024-08-21.at.6.48.43.p.m.mov

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

None

Terms

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

It's literally just React Strict Mode. I commented it out and it only ran once. What's happening here is 100% expected React behavior.

image