Skip to content

Commit

Permalink
goto first page on filter change
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 20, 2024
1 parent e4831c1 commit 8127b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/PerspectiveView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ const PerspectiveViewWrapper = ({ id, className, mode, entitiesMode, page, data,
perspective: { columns }
} = data;

//TODO: this needs optimization
const reRender = () => {
data.refetch();
console.log("Refetched 'queryPerspective'");
Expand Down
1 change: 1 addition & 0 deletions src/pages/Perspective/saga.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { request, selectors, SET_FILTER } from "ducks/perspective";

export function* updateForFilter({ payload: filter }) {
const { params } = yield select(selectors.getPerspective);
params.page = 1;
yield put(request({ ...params, filter }, true));
}

Expand Down

0 comments on commit 8127b2f

Please sign in to comment.