Describe the bug
Hello. I am using this design in my Next.js project. While integrating the table system, I ran into an issue and had to use local state management for the filter system. However, I couldn’t find the part of the code that was set up for local state management in the section below.
|
const pageCount = table.getPageCount() |
|
useEffect(() => { |
|
ensurePageInRange(pageCount) |
|
}, [pageCount, ensurePageInRange]) |
I’m asking because when I render the table I get the following error:
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 tries to update the component. Move this work to useEffect instead.
app\(protected)\dashboard\blogs\page.tsx (15:9) @ Home
13 | <Header title="Bloglar" description="Tüm bloglarınızın listelendiği sayfa." />
14 | <Main>
> 15 | <Blogs />
| ^
16 | </Main>
17 | </>
18 | );
To fix the error, I need to add autoResetPageIndex: false to the useReactTable object, but then filtering stops working correctly.
What should I do about this?
Describe the bug
Hello. I am using this design in my Next.js project. While integrating the table system, I ran into an issue and had to use local state management for the filter system. However, I couldn’t find the part of the code that was set up for local state management in the section below.
shadcn-admin/src/features/tasks/components/tasks-table.tsx
Lines 100 to 103 in 69f5a71
I’m asking because when I render the table I get the following error:
To fix the error, I need to add
autoResetPageIndex: falseto theuseReactTableobject, but then filtering stops working correctly.What should I do about this?