Add reusable SearchInput component and docs#219
Open
krowvin wants to merge 7 commits into
Open
Conversation
LaurenAllin
reviewed
Jun 8, 2026
LaurenAllin
left a comment
Collaborator
There was a problem hiding this comment.
This mostly works as expected - but I still need to test a few additional features. I added a commit with a suggested styling change to avoid the icon and the input text from overlapping.
A couple of suggestions:
- It would be nice to have an option to add an ignore/blacklist array into the component as a user defined/optional property, with a function in the SearchInput.tsx to filter out any ids that match an item in the array.
- There is not an endpoint that I can find that would allow this, but a nice to have in the future would be a way to search by public name rather than location id. A user might try to search for Lock and Dam XX, but this will return nothing. The user would have to know to search for LockDam_XX, which is not user friendly.
Collaborator
|
Finished testing properties for the SearchInput component. All properties seem to be working as expected except for errorMessage. When the errorMessage is set to a string (i.e. errorMessage="Error"), the search box will only return the error message, even when there is no error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a reusable SearchInput component to groundwork-water so district sites can share the
same search bar behavior without copying app-specific Redux/search code.
What changed
error states
search approach
Notes