Skip to content

Commit

Permalink
refactor(ui-form-field): remove border from new form errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasf committed Feb 11, 2025
1 parent 57b49d2 commit 6315fcb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/ui-form-field/src/FormFieldGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ class FormFieldGroup extends Component<FormFieldGroupProps> {
}

get makeStylesVariables(): FormFieldGroupStyleProps {
return { invalid: this.invalid }
// new form errors dont need borders
const oldInvalid =
!!this.props.messages &&
this.props.messages.findIndex((message) => {
return message.type === 'error'
}) >= 0
return { invalid: oldInvalid }
}

get invalid() {
Expand Down

0 comments on commit 6315fcb

Please sign in to comment.