Closed cbiddle3 closed 6 months ago
@cbiddle3 - Summarizing the key points that we discussed for your reference,
Also, I could see that a compose-dev file has been added. As it is not relevant to this story, can you please remove it?
Closing this PR as this is verified and approved as part of the PR #79
Fixes #75
What was changed?
When the user presses Signup for Shifts from the navigation bar, there is now a search bar with a clear button and a search button. The user can also press enter while in the search bar field to search. This validates users' input and only allows them to enter alphanumeric characters as well as "-", " ' ", '&', " / ", "(", ")", ":" or "," and requires the search to be at least 5 characters.
Why was it changed?
To provide easier functionality for the user so they could search for a specific shelter instead of having to scroll through all the shelters.
How was it changed?
SearchBar.js was created as a Component and is in the Components directory. The SearchBar object has its own search button, clear button, and keyDown listener so the user can press enter. SearchBar.css provides styling for the search bar, and code that ensures the buttons match the styling from the rest of the webpage. To add the Search bar on the page, I altered Shifts.js and added the component between the current location and radius selection.
Search button enabled:
Search button disabled: