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

Filters cache resotration not being skipped when explicit query params specified #7151

Closed
2 tasks
rithviknishad opened this issue Feb 2, 2024 · 0 comments · Fixed by #7157
Closed
2 tasks
Assignees
Labels
bug Something isn't working

Comments

@rithviknishad
Copy link
Member

rithviknishad commented Feb 2, 2024

Describe the bug
When we explicitly navigate to a page with filters that has a different value for a key (that is cached), the page is loaded with the filter from the cache instead of the explicitly mentioned value from URL

To Reproduce
Steps to reproduce the behavior:

  1. Go to Patients tab
  2. Apply Facility filter (facility 1) from the Advanced Filters tab
  3. Go to facilities tab, open another facility (facility 2)
  4. Click View Patients on facility 2
  5. You land on patients list page with facility 1 filtered instead of facility 2

Expected behavior
Invalidate cache / skip cache restoration when query params are present in URL.
Or: Cache restoration to work only if no qparams present

Other problems:

  • We are applying filters to search params and caching filters that are not applied.
image image

Action Items

  • Invalidate cache if query params are present when component mounts.
  • Skip applying/caching filters that are not applied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
1 participant