Replies: 2 comments
-
I don't think it is a problem on your end. There is some warning popping up from the internals of MRT in the MRT_TableRoot.tsx file, but I haven't been able to find the cause. It is just a warning for now, so no need for much concern. |
Beta Was this translation helpful? Give feedback.
-
@KevinVandy if this is the same issue I was having with Mantine React Table it appears to be caused by the autoResetPageIndex prop in Tanstack Table. Setting this to false fixes the issue, but obviously changes the behavior of the table as well. Another solution is to use a state variable for the autoResetPageIndex that is set to true or a user-defined value in a useEffect. This can be seen in my comment here: KevinVandy/mantine-react-table#67 (comment) This also fixes the issue, but without the side-effect of changing the behavior of the table. It might cause a re-render due to the use of useState / setAutoResetPageIndex however, but I believe it is a cleaner solution than using a ref for the mounted state of the component. It might be possible to fix it in another way, since it appears to have something to do with how MRT uses getPaginationRowModel. This causes Tanstack Table to trigger the auto-reset for the page index, which is executed as a queued action/promise. That is what ultimately causes this side-effect. But I have not looked into how this might be fixed, since a lot of the internals of MRT rely on getPaginationRowModel, for example as a dependency inside useEffect statement. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I use tRPC as Backend, so the code I use React Query Example ,the error show when I do this 👇👇

Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.
I assume that it is because the data still loading so this page can't render, but I already use
isLoading
method to prevent this problem, what do I miss?Beta Was this translation helpful? Give feedback.
All reactions