Reorganize menu (#178)
This commit is contained in:
committed by
GitHub
parent
5f806474e3
commit
fd6b5024c7
@ -20,7 +20,7 @@ export default class EditableText extends Component<Props, InputState> {
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(props: Props) {
|
||||
UNSAFE_componentWillReceiveProps(props: Props) {
|
||||
this.setState({ value: props.value });
|
||||
}
|
||||
|
||||
@ -52,6 +52,11 @@ export default class EditableText extends Component<Props, InputState> {
|
||||
value={value}
|
||||
onChange={e => this.handleEdit(e)}
|
||||
onBlur={() => this.handleBlur()}
|
||||
onKeyDown={e => {
|
||||
if (e.key === "Enter") {
|
||||
this.handleBlur();
|
||||
}
|
||||
}}
|
||||
autoFocus
|
||||
/>
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user