-
Notifications
You must be signed in to change notification settings - Fork 5
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
New: AlertInput onFocus prop addition #636
Conversation
Codecov Report
@@ Coverage Diff @@
## master #636 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 49 49
Lines 691 693 +2
Branches 144 145 +1
=====================================
+ Hits 691 693 +2
Continue to review full report at Codecov.
|
5b01d5c
to
7580eb1
Compare
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.
lgtm ⭐ 🌟 💥
@@ -46,6 +46,10 @@ export default class AlertInput extends Component { | |||
isFocused: true, | |||
isPopoverVisible: Boolean(this.props.alertMessage), | |||
}); | |||
|
|||
if (this.props.onFocus) { | |||
this.props.onFocus(event); |
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.
probably just default to _.noop
so you don't have to make this check
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.
I disagree, I think this check is valid and preferable to a noop for consistency with other types and for providing explicitness with the optional parameters.
Discussion outcome for moving to noop: Stick to existing. |
Merged.. ⏰ |
Add
onFocus
propType function toAlertInput
Resolves: #637