mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 00:52:09 +00:00
improvement: org user groups tables search fixed and col sort added and group add users pagination fixed and search improved to include first and last name
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Dispatch, SetStateAction, useEffect } from "react";
|
||||
|
||||
export const useResetPageHelper = ({
|
||||
totalCount,
|
||||
offset,
|
||||
setPage
|
||||
}: {
|
||||
totalCount: number;
|
||||
offset: number;
|
||||
setPage: Dispatch<SetStateAction<number>>;
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
// reset page if no longer valid
|
||||
if (totalCount <= offset) setPage(1);
|
||||
}, [totalCount]);
|
||||
};
|
||||
Reference in New Issue
Block a user