-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
SelectControl: Add onChange, onBlur and onFocus to storybook actions #45432
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
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.
🚀 Thank you!
@@ -23,6 +23,7 @@ const meta: ComponentMeta< typeof SelectControl > = { | |||
prefix: { control: { type: 'text' } }, | |||
suffix: { control: { type: 'text' } }, | |||
value: { control: { type: null } }, | |||
onChange: { action: 'onChange' }, |
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.
An alternative that we could look into adopting across the package is to use a regex to mark as actions all on*
props (see for example FocalPointPicker
's Storybook parameters)
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. Didn't know you could do that. Would be great to get onBlur
and onFocus
as well. I'll update the PR later today.
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.
Updated the PR to match all on*
using regex.
What?
Log
onChange
,onBlur
andonFocus
props to the Actions screen in Storybook.Why?
To see what
onChange
,onBlur
andonFocus
does.How?
Update
SelectControl
storybook to log all props stating withon
in the Actions screen.Testing Instructions
SelectControl
story and change the value.onChange
,onBlur
andonFocus
was logged in the Actions screen.Screenshots or screencast