carbon-design-system/carbon

Search component missing mouse action

Open

#6,301 opened on Jun 17, 2020

 (12 comments) (0 reactions) (0 assignees)JavaScript (1,733 forks)batch import
afrohackscomponent: searchhacktoberfestneeds: community contributionneeds: design contributionproposal: acceptedrole: design :pencil2:type: enhancement 💡

Repository metrics

Stars
 (7,442 stars)
PR merge metrics
 (Avg merge 9d 14h) (106 merged PRs in 30d)

Description

image The search component is missing an optional button for search submit. I suggest a validation function as optional, returning true if the text is valid for search. If valid, an icon shows up/enters enabled state that is clickable and fires the search callback. Bonus - Search callback should be also fired by hitting enter in the search field, if text is valid. I think this is a common functionality and should not be implemented in carbon, as it is used on IBM sites and the look and feel should be common for all sites. The clickable icon could be the spyglass which is now on the left, moved to the right.

Contributor guide