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

feat(Search): add Esc button support to clear input field #7230

Merged
merged 4 commits into from
Nov 6, 2020

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Nov 5, 2020

Closes #7228

This PR adds Esc button support to clear the Search component input field

Changelog

New

  • clear input field on Esc keydown

Changed

  • compose onChange event handlers so that they are not overwritten by <Search /> s internal change event handler

Testing / Reviewing

Confirm the Esc key clears the search input field and any attached onChange or onKeyDown handlers are still fired

@netlify
Copy link

netlify bot commented Nov 5, 2020

Deploy preview for carbon-elements ready!

Built with commit 832c37f

https://deploy-preview-7230--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Nov 5, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 832c37f

https://deploy-preview-7230--carbon-components-react.netlify.app

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

Copy link
Contributor

@dakahn dakahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did we not have this? 🤕 Great job! Tested on Firefox on Windows 10

@kodiakhq kodiakhq bot merged commit 96b2d1e into carbon-design-system:master Nov 6, 2020
@emyarod emyarod deleted the 7228-clear-search-esc branch November 9, 2020 15:55
@emyarod emyarod mentioned this pull request Nov 12, 2020
59 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search should clear when user types Esc
3 participants