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

Cache only the advance filters across the platform #6891

Closed
nihal467 opened this issue Dec 21, 2023 · 6 comments · Fixed by #6988
Closed

Cache only the advance filters across the platform #6891

nihal467 opened this issue Dec 21, 2023 · 6 comments · Fixed by #6988
Assignees

Comments

@nihal467
Copy link
Member

Describe the bug

Currently the search across the platform cache all type of filters

To Reproduce
Steps to reproduce the behavior:

  1. Go to any tab with search
  2. See error

Expected behavior

we should be only cache the advance filters across the platform

Screenshots

image

@AshrafMd-1
Copy link
Contributor

I want to work on this issue can you assign me this issue

@AshrafMd-1
Copy link
Contributor

@nihal467 small doubt


Clear the cache as in local storage
image


or the auto-fill one
image

@Ashesh3
Copy link
Member

Ashesh3 commented Dec 29, 2023

@AshrafMd-1 Cache, in the sense if you search a query and then search for the same query again, it won't perform the search again. It checks if the search field has changed or not before performing a search. The issue is about removing this behavior from search inputs and keep it (as it already is) for advanced filters.

Demo:
Go here:
image
Press enter, then keep pressing enter to search. you will notice that it won't perform any searches since the query isn't changing, but we expect it to refetch the results from the query even if the search term is the same.

  • So do not cache it in localstorage and force it to fetch results whenever we search for anything (even if the query is the same consecutively)

@AshrafMd-1
Copy link
Contributor

@Ashesh3 okay
Thx for clarifying.

@AshrafMd-1
Copy link
Contributor

@rithviknishad can u assign this to me

@rithviknishad
Copy link
Member

We are hardocding a blacklist keys as an array as of now (for page limit offset).

We could pass additional blacklist field keys as an array to the caching code. So that in patient list page, we can also include phone number and ip/op number fields too easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants