Skip to content

Commit 8836371

Browse files
AmitShwartslidord-wix
authored andcommitted
fix: text field on change (#2422)
1 parent 2bb71d3 commit 8836371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/incubator/TextField/useFieldState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function useFieldState({
4242
if (props.value !== value) {
4343
setValue(props.value);
4444

45-
if (validateOnChange) {
45+
if (validateOnChange && (!props.defaultValue || value !== props.defaultValue)) {
4646
validateField(props.value);
4747
}
4848
}

0 commit comments

Comments
 (0)