fix: prevent infinite rerendering of DataTable (#18087)

This commit is contained in:
Eunjae Lee authored and GitHub committed 2024-12-11 14:03:17 +00:00
1 parent 6739ed3a87
commit 7d2523e823
4 files changed
+39 -37

No files matched your search

@@ -117,7 +117,7 @@ export function UserListTable() {
const columnFilters = useColumnFilters();
const { data, isPending, fetchNextPage, isFetching } =
const { data, isPending, hasNextPage, fetchNextPage, isFetching } =
trpc.viewer.organizations.listMembers.useInfiniteQuery(
{
limit: 30,
@@ -428,13 +428,12 @@ export function UserListTable() {
},
});
const fetchMoreOnBottomReached = useFetchMoreOnBottomReached(
const fetchMoreOnBottomReached = useFetchMoreOnBottomReached({
tableContainerRef,
hasNextPage,
fetchNextPage,
isFetching,
totalFetched,
totalDBRowCount
);
});
const numberOfSelectedRows = table.getSelectedRowModel().rows.length;