-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use session storage to persist filter and search #3114
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3114 +/- ##
==========================================
+ Coverage 87.02% 89.11% +2.08%
==========================================
Files 219 83 -136
Lines 13653 4244 -9409
Branches 703 720 +17
==========================================
- Hits 11882 3782 -8100
+ Misses 1762 442 -1320
- Partials 9 20 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -8,6 +8,7 @@ import { usePathname, useSearchParams, useRouter } from "next/navigation"; | |||
import { range } from "../view-data/utils/utils"; | |||
import classNames from "classnames"; | |||
import Link from "next/link"; | |||
import { saveToSessionStorage } from "./utils"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add an e2e test that covers this functionality?
|
||
return ( | ||
<tr> | ||
<td> | ||
<Link href={`/view-data?id=${item.ecrId}`}> | ||
<Link onClick={saveUrl} href={`/view-data?id=${item.ecrId}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so simple! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧨
PULL REQUEST
Summary
Saves search param info into session storage and uses it to build the href for the link back to the eCR Library from the view page.
Related Issue
Fixes #3063
Acceptance Criteria
When a user has filters applied and navigates into a single eCR, the filters and/or search should persist on return