Skip to content

Commit

Permalink
fix defaultValue check (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidord-wix committed Jan 22, 2023
1 parent 8836371 commit 3e6238b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/incubator/TextField/useFieldState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function useFieldState({
if (props.value !== value) {
setValue(props.value);

if (validateOnChange && (!props.defaultValue || value !== props.defaultValue)) {
if (validateOnChange && (_.isUndefined(props.defaultValue) || value !== props.defaultValue)) {
validateField(props.value);
}
}
Expand Down

0 comments on commit 3e6238b

Please sign in to comment.