-
Notifications
You must be signed in to change notification settings - Fork 458
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
Update TextInput.js #550
base: develop
Are you sure you want to change the base?
Update TextInput.js #550
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,13 @@ class TextInput extends PureComponent { | |
|
||
handleBlur() { | ||
this.setState({ isFocused: false }); | ||
this.props.onBlur() | ||
} | ||
|
||
handleFocus() { | ||
this.setState({ isFocused: true }); | ||
this.props.onFocus() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Destructure
|
||
} | ||
|
||
render() { | ||
Comment on lines
31
to
32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reintroduce this newline between |
||
const { | ||
errorMessage, | ||
|
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.
Destructure
onBlur
fromthis.props
on the first line of the method with a fallback tonull
if it isn't set. This should be followed by a newline. Then check ifonBlur
is truthy and run it: