Skip to content

Commit

Permalink
Fix fields error bug (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc authored Aug 18, 2023
1 parent 9571a01 commit bfbe23b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/components/fields/editor/base/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export class EditorFieldText extends React.Component<IEditorFieldTextProps, ISta
testId={this.props.testId}
refNode={this.node}
noPadding={this.props.noPadding}

>
{this.state.suggestions.length === 0 ? (
<Input
Expand All @@ -116,11 +115,10 @@ export class EditorFieldText extends React.Component<IEditorFieldTextProps, ISta
label={this.props.label}
required={this.props.required ?? this.props.schema?.required}
disabled={this.props.disabled}
invalid={this.props.invalid ?? (error != null && this.props.showErrors)}
maxLength={this.props.maxLength ?? this.props.schema?.maxlength}
info={this.props.info}
inlineLabel={this.props.inlineLabel}
error={this.props.showErrors && error}
error={this.props.showErrors ? error : undefined}
onChange={this.onChange}
/>
) : (
Expand All @@ -133,7 +131,7 @@ export class EditorFieldText extends React.Component<IEditorFieldTextProps, ISta
invalid={this.props.invalid ?? (error != null && this.props.showErrors)}
info={this.props.info}
inlineLabel={this.props.inlineLabel}
error={this.props.showErrors && error}
error={this.props.showErrors ? error : undefined}
onChange={this.onChange}
items={this.state.suggestions}
/>
Expand Down

0 comments on commit bfbe23b

Please sign in to comment.