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

Add placeholder text to search bar #88

Closed
SchaeStewart opened this issue Aug 15, 2020 · 7 comments · Fixed by #104
Closed

Add placeholder text to search bar #88

SchaeStewart opened this issue Aug 15, 2020 · 7 comments · Fixed by #104
Assignees
Labels

Comments

@SchaeStewart
Copy link
Contributor

Currently the search only supports searching for Candidate by name, or contributors by name. We should add a placeholder text to the search bar explaining this

@Dafondo Dafondo self-assigned this Aug 15, 2020
@Dafondo
Copy link
Member

Dafondo commented Aug 15, 2020

Looks like the placeholder prop isn't getting passed to the input child element of the Search component. Would like another pair of eyes on this before I open an issue in trussworks/react-uswds.

Currently we can do a dirty workaround by passing an inputId and manually setting a placeholder for the input element on page load.

@funkybunch
Copy link
Member

Looks like the location the prop would need to be added is SUPER nested since its all compiled.

I think we should open up an issue. Line 69 in https://github.com/trussworks/react-uswds/blob/main/src/components/Search/Search.tsx is where it would need to be added.

Alternatively, we could add the HTML that it renders to the <Search> component in the short term and add the placeholder attribute manually.

@SchaeStewart
Copy link
Contributor Author

I can open an issue if you'd like. It looks like a pretty easy fix on their end so I can submit a PR for it once an issue is created. @Dafondo

@SchaeStewart
Copy link
Contributor Author

I went ahead and opened the issue: trussworks/react-uswds#403

@SchaeStewart
Copy link
Contributor Author

And I submitted a pr: trussworks/react-uswds#404

@funkybunch
Copy link
Member

@SchaeStewart Sweet! Hopefully they turn it around quickly.

@SchaeStewart
Copy link
Contributor Author

Looks like it's released, we just need to upgrade our usdws version to 1.9.1
https://github.com/trussworks/react-uswds/releases/tag/1.9.1

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

Successfully merging a pull request may close this issue.

3 participants