Skip to content

Commit

Permalink
Custom expression editor: hide error on the correction attempt (metab…
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya authored Jan 4, 2022
1 parent 0af13ab commit 4f078bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export default class ExpressionEditorTextfield extends React.Component {
};

handleExpressionChange(source) {
this.setState({ source });
this.setState({ source, errorMessage: null });
if (this.props.onBlankChange) {
this.props.onBlankChange(source.length === 0);
}
Expand Down Expand Up @@ -400,7 +400,7 @@ export default class ExpressionEditorTextfield extends React.Component {
highlightedIndex={this.state.highlightedSuggestionIndex}
/>
</EditorContainer>
<ErrorMessage error={errorMessage} />
{!isFocused && <ErrorMessage error={errorMessage} />}
<HelpText helpText={this.state.helpText} width={this.props.width} />
</React.Fragment>
);
Expand Down

0 comments on commit 4f078bc

Please sign in to comment.