Reorganize menu (#178)

This commit is contained in:
Christopher Chedeau 2020-01-05 14:45:16 -08:00 committed by GitHub
parent 5f806474e3
commit fd6b5024c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 52 deletions

View file

@ -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
/>
) : (