Skip to content

Commit

Permalink
Sovle issue where showValid would be forwarded to the textField element
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Jan 10, 2025
1 parent 52b8a88 commit 026114e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-files-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/ecommerce-ui': patch
---

Sovle issue where showValid would be forwarded to the textField element
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ function TextFieldElementBase(props: TextFieldElementProps): JSX.Element {
rules = {},
shouldUnregister,
disabled,
} = props as BaseControllerProps
const { showValid } = props as ShowValidProps
const { type, required, ...rest } = props as TextFieldProps
type,
required,
showValid,
...rest
} = props as TextFieldProps & ShowValidProps & BaseControllerProps

if (required && !rules.required) {
rules.required = i18n._(/* i18n */ 'This field is required')
Expand Down

0 comments on commit 026114e

Please sign in to comment.