diff --git a/frontend/scenes/Settings/Settings.js b/frontend/scenes/Settings/Settings.js index 9720cd25..31c4b6e0 100644 --- a/frontend/scenes/Settings/Settings.js +++ b/frontend/scenes/Settings/Settings.js @@ -109,11 +109,16 @@ class InlineForm extends React.Component { onSubmit: Function, disabled?: boolean, }; + validationTimeout: number; state = { validationError: false, }; + componentWillUnmount() { + clearTimeout(this.validationTimeout); + } + handleSubmit = event => { event.preventDefault(); if (this.props.value) { @@ -122,7 +127,7 @@ class InlineForm extends React.Component { this.setState({ validationError: true, }); - setTimeout( + this.validationTimeout = setTimeout( () => this.setState({ validationError: false,