diff --git a/packages/core/src/hooks/useQueryParamState.ts b/packages/core/src/hooks/useQueryParamState.ts index dc2279cb53..da303234f5 100644 --- a/packages/core/src/hooks/useQueryParamState.ts +++ b/packages/core/src/hooks/useQueryParamState.ts @@ -58,6 +58,7 @@ type SetQueryParams = (params: T) => void; export function useQueryParamState( stateName: string, + debounceTime: number = 100, ): [T | undefined, SetQueryParams] { const navigate = useNavigate(); const location = useLocation(); @@ -85,7 +86,7 @@ export function useQueryParamState( navigate({ ...location, search: `?${queryString}` }, { replace: true }); } }, - 100, + debounceTime, [queryParamState], ); diff --git a/plugins/api-docs/src/components/ApiExplorerTable/ApiExplorerTable.tsx b/plugins/api-docs/src/components/ApiExplorerTable/ApiExplorerTable.tsx index 5b9808e26d..39c2caaf1b 100644 --- a/plugins/api-docs/src/components/ApiExplorerTable/ApiExplorerTable.tsx +++ b/plugins/api-docs/src/components/ApiExplorerTable/ApiExplorerTable.tsx @@ -156,6 +156,7 @@ export const ApiExplorerTable = ({ }: ExplorerTableProps) => { const [queryParamState, setQueryParamState] = useQueryParamState( 'apiTable', + 500, ); if (error) {