add debounce time for apis-docs
Signed-off-by: MiguelRamBalt <v-migueramirez@expediagroup.com>
This commit is contained in:
@@ -58,6 +58,7 @@ type SetQueryParams<T> = (params: T) => void;
|
||||
|
||||
export function useQueryParamState<T>(
|
||||
stateName: string,
|
||||
debounceTime: number = 100,
|
||||
): [T | undefined, SetQueryParams<T>] {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
@@ -85,7 +86,7 @@ export function useQueryParamState<T>(
|
||||
navigate({ ...location, search: `?${queryString}` }, { replace: true });
|
||||
}
|
||||
},
|
||||
100,
|
||||
debounceTime,
|
||||
[queryParamState],
|
||||
);
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ export const ApiExplorerTable = ({
|
||||
}: ExplorerTableProps) => {
|
||||
const [queryParamState, setQueryParamState] = useQueryParamState<TableState>(
|
||||
'apiTable',
|
||||
500,
|
||||
);
|
||||
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user