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

feat: persisting event page search in url state #681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aadarsh-nagrath
Copy link

What this PR do ?

-The state variable selectedEventId is updated when an event is selected from the table.

-Browser's URL state updates with the selected event's ID.so the page reflects the selected event even after a reload.
selected event ID is extracted from the URL state. This ensures that the component reflects the correct selected event when the page is loaded or when the URL changes.

-search Term state variable tracks the search term locally. Whenever the searchTerm state variable changes, the useEffect hook is triggered. It updates the URL state with the new search term value.

-URL state can be updated with relevant information such as page number, page size, search term, and selected event, so the component ensures that the page state can be preserved even after a reload.

/fix #637
/claim #637

@maxgurewitz
Copy link
Member

maxgurewitz commented Feb 22, 2024

@aadarsh-nagrath we ask that contributors include a screen recording of their features. Can you include a screen recording of,

  1. you using the search page
  2. going to the next page
  3. entering a search term
  4. reload the page and see that the information is preserved?

@@ -55,6 +55,7 @@
"react-device-detect": "^2.2.2",
"react-diff-view": "^3.0.3",
"react-dom": "18.2.0",
"react-router-dom": "^6.22.1",
Copy link
Member

Choose a reason for hiding this comment

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

you should not need to install new dependencies

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

Successfully merging this pull request may close these issues.

[DF-436] persist event page search in url state
2 participants