Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed facility search offset #4004

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Components/Facility/HospitalList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const HospitalList = (props: any) => {
facility_type: qParams.facility_type,
kasp_empanelled: qParams.kasp_empanelled,
};

if (params.search_text) params.offset = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GokulramGHV this only works for the search by name filter and will not work for others, so why not add a page parameter as 1 when we make a request related to filters

Copy link
Member

@rithviknishad rithviknishad Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GokulramGHV also checkout PR #4009
The page offset still remains to 2 :/

image

cc: @khavinshankar

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GokulramGHV @khavinshankar @nihal467 the changes suggested here are fixed in #4017.
Merging this PR to develop will have no effect once #4017 is merged. since the reset method used in this PR is not based on query parameters. The changes were overridden in #4017

const res = await dispatchAction(getPermittedFacilities(params));
if (!status.aborted) {
if (res && res.data) {
Expand Down