mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Reorganize menu (#178)
This commit is contained in:
parent
5f806474e3
commit
fd6b5024c7
3 changed files with 53 additions and 52 deletions
|
@ -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
|
||||
/>
|
||||
) : (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue