Minor code cleanup (#10613)
This commit is contained in:
parent
c9441bf82e
commit
bdec58b514
3 changed files with 20 additions and 26 deletions
|
@ -73,7 +73,7 @@ class Search extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
handleKeyDown = (e) => {
|
||||
handleKeyUp = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
this.props.onSubmit();
|
||||
|
@ -82,10 +82,6 @@ class Search extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
noop () {
|
||||
|
||||
}
|
||||
|
||||
handleFocus = () => {
|
||||
this.setState({ expanded: true });
|
||||
this.props.onShow();
|
||||
|
@ -110,7 +106,7 @@ class Search extends React.PureComponent {
|
|||
placeholder={intl.formatMessage(messages.placeholder)}
|
||||
value={value}
|
||||
onChange={this.handleChange}
|
||||
onKeyUp={this.handleKeyDown}
|
||||
onKeyUp={this.handleKeyUp}
|
||||
onFocus={this.handleFocus}
|
||||
onBlur={this.handleBlur}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue