-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(tile): adds onChange call to handlers in selectable tile #5156
fix(tile): adds onChange call to handlers in selectable tile #5156
Conversation
Deploy preview for the-carbon-components ready! Built with commit 0691601 https://deploy-preview-5156--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react failed. Built with commit 0691601 https://app.netlify.com/sites/carbon-components-react/deploys/5e2b8f240d31290008fca90f |
Deploy preview for carbon-elements ready! Built with commit 0691601 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! 🏄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one change suggestion - Thanks @abbeyhrt!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of that! 👍 ✅
Co-Authored-By: Akira Sudoh <asudoh@gmail.com>
Closes #5130
This PR adds a call to
onChange
onhandleClick
andhandleKeydown
so that it's called when people select a tile through the traditional methods. This removes theisInput
check fromhandleClick
because the input is a 1x1 square behind the label and can not be clicked. It also adds a test to make sure theonChange
handler is calledChangelog
New
onChange
propChanged
onChange
call to handlersRemoved
isInput
fromhandleClick
Testing / Reviewing
Pull down the PR, add a console.log to the onChange prop and verify that onChange is called when a tile is selected.