-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[BUG] useTable
from @refinedev/react-table
causes infinite rendering
#6265
Comments
Hey @khoaxuantu, I couldn't reproduce the issue from the code you've provided. Could you provide a repository with a minimal repro? That would be great! Thanks. |
Just checked out the codebase you've provided @khoaxuantu. I was able to reproduce the same rendering issue with the initial setup. Then it resolved when I removed the |
@aliemir It doesn't work 100% correct, sadly. I have tried both
Another thing that I noticed is that if I visit the |
Hey @khoaxuantu you are right! My bad, I only tested out in the same page and hot reloading fixed the issue when I made changes in the I've found that the issue happens when syncing sorters and filters from React Table to Refine. We did not had a check if the current states are equal or not and left with repeated calls to When the issue is stuck at loading, Refine's overtime interval keeps running, this was causing your console.log to run repeatedly every second. It looks like an infinite rendering issue but its really logging due to In my local, I've tested out using Let us know if |
Hey @aliemir, I just tried setting |
Hey @aliemir, were you suggesting something like this? if (!isEqual(crudFilters, filtersCore)) {
setFilters(crudFilters);
} |
Hey @Anonymous961 yeah this is what I tried, would love to hear from you if you can spare some time to work on this 🙏 |
This comment was marked as abuse.
This comment was marked as abuse.
Hey hey, I've been using refine recently and really fell in love with this amazing product. Can I work on this issue? |
Hey, first of all, if this repo isn't up for hacktoberfest, it's fine. I want to fix this issue genuinely out of my likeness towards the product. Secondly, please do not make this assumption about anyone that participates in the hacktoberfest event. It's hurtful to see your comment as someone who is literally interested in contributing to the product. Your message is very unwelcoming and opinionated to me. I asked to be assigned with the task just to make sure that no one else has been working on the issue because it seems to have a long discussion going on. |
Does any of these facts validate that you can be unwelcoming to someone who wants to be a part of an open source project? Like because the person is a female, because you don't know when they started contributing? Is it that hard for you just to say "yep, feel free to go ahead"? Are you sure your actions here adhere to the policies in this repo? I literally have never seen someone being this agressive for no reason. If this gets allowed, I would be pretty surprised. I thought you were just having a bad day but now it just seems you are full of disrespect for other people. Please stop right now. |
Reported. |
Only if you have checked these things, you would understand what you are doing is unacceptable. |
Can this bug be assigned to me? |
@raulmar0 feel free to start working on this issue and submit a pull request when you're ready. No need to wait for it to be assigned to you. |
Describe the bug
I was trying to create a list view following up the example of
useTable
. However, when I got to the page, the page was rendering infinitely as the following:It seems like the
tableQuery
's status remains its fetchStatus as "fetching", but there is no calling to the data provider'sgetList
client action, and the data remainsundefined
, so no data can be displayed.Steps To Reproduce
My code is mostly the same with the usage example. The difference is it is built on top of Next.js's app routing.
Here is my Refine's layout:
Here is my page at
/src/app/users/page.tsx
Expected behavior
Packages
├── [email protected]
├── [email protected]
├── [email protected]
├── @refinedev/[email protected]
├── @tanstack/[email protected]
├── @refinedev/[email protected]
├── @refinedev/[email protected]
├── @refinedev/[email protected]
├── @chakra-ui/[email protected]
Additional Context
Btw, I saw in the source code that it may pass an empty array
[]
to the TanStack'sreactTable
here.Wondering if it has any effect on the infinite rendering of
useTable
. Because there was a TanStack's issue that is quite similar to it.The text was updated successfully, but these errors were encountered: