Improve 404 handling

This commit is contained in:
Ken-Håvard Lieng 2018-11-29 13:06:37 +01:00
parent 869713d236
commit 5861a54dfc
4 changed files with 146 additions and 125 deletions

View file

@ -17,11 +17,7 @@ export default class Editable extends PureComponent {
// eslint-disable-next-line react/no-did-update-set-state
this.updateInputWidth(this.props.value);
this.inputEl.current.focus();
}
}
getSnapshotBeforeUpdate(prevProps) {
if (this.state.editing && prevProps.value !== this.props.value) {
} else if (this.state.editing && prevProps.value !== this.props.value) {
this.updateInputWidth(this.props.value);
}
}