diff --git a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx index 0479870c53..1ef7a86cb1 100644 --- a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx +++ b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx @@ -100,9 +100,13 @@ interface Params { } const useQueryMembersList = (params: Params) => { - const { data: queryData, ...rest } = useInfiniteQueryV5( - SelfHostedUserListQueryOpts(params) - ) + const { + data: queryData, + isFetchingNextPage, + hasNextPage, + fetchNextPage, + isLoading, + } = useInfiniteQueryV5(SelfHostedUserListQueryOpts(params)) const flatUsersList = useMemo( () => queryData?.pages?.flatMap((page) => page.results) ?? [], @@ -110,8 +114,11 @@ const useQueryMembersList = (params: Params) => { ) return { - ...rest, data: flatUsersList, + isFetchingNextPage, + hasNextPage, + fetchNextPage, + isLoading, } }