Skip to content

Commit 08b220a

Browse files
committed
Fix RunList pagination is reset
1 parent 3130ef7 commit 08b220a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/run/RunRaListFilters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const weekAgo = (): Date => {
3636
const RunRaListFilters = () => {
3737
const translate = useTranslate();
3838
const { filterValues, setFilters } = useListContext();
39-
const form = useForm({ defaultValues: filterValues });
39+
const form = useForm();
4040

4141
const onSubmit = useCallback(
4242
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -58,7 +58,7 @@ const RunRaListFilters = () => {
5858

5959
// fill up filters just after opening the page
6060
useEffect(() => {
61-
submit();
61+
onSubmit({ defaultValues: filterValues });
6262
}, [submit]);
6363

6464
return (

0 commit comments

Comments
 (0)