VRMS
VRMS copied to clipboard
Create user search query hook
Overview
Currently, when a user uses, "User Search" or "User Permission Search" features on VRMS and navigates to a specific user's profile, and clicks "Back to search", their search query is no longer stored. This issue focuses on the first step of implementing a search query hook that will allow us to preserve the user's previous search when navigating "Back to search."
Action Items
- [x] Requirement: The functionality to search for and store queries will be handled by the hook, so that the component that renders the items will no longer have that logic (we are moving the logic of the search component into a hook).
- [x] Explore how to make a hook.
- [x] Move the query functionality into the hook.
- [x] Import the hook into the component.
- [x] Replace the search with the functionality created by the hook:
- [x] Stored state
- [x] Query refresh logic
- [x] Search mode (
User SearchorUser Permission Search) - [x] Query filter string (the actual search text entered by the user)
- [x] Query filter type (for
User Search=Results by NameorResults by Email, and forUser Permission Search=AdminsorProject Members)