Skip to content

Commit 3b697b7

Browse files
committed
Merge branch 'r/17.x' into r/18.x
2 parents e106495 + 9feba2c commit 3b697b7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/components/shared/Stats.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
removeTextFilter,
1111
} from "../../slices/tableFilterSlice";
1212
import { loadEventsIntoTable } from "../../thunks/tableThunks";
13+
import { setOffset, setPageActive } from "../../slices/tableSlice";
1314
import { useAppDispatch, useAppSelector } from "../../store";
1415
import { fetchEvents } from "../../slices/eventSlice";
1516
import { ParseKeys } from "i18next";
@@ -40,6 +41,9 @@ const Stats = () => {
4041
const filter = filterMap.find(({ name }) => name === f.name);
4142
filterValue = f.value;
4243
if (filter) {
44+
// go to first page without reloading all events
45+
dispatch(setOffset(0));
46+
dispatch(setPageActive(0));
4347
dispatch(editFilterValue({ filterName: filter.name, value: filterValue, resource: "events" }));
4448
}
4549
});

0 commit comments

Comments
 (0)