We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c5e30c commit d71f431Copy full SHA for d71f431
.changeset/ripe-webs-shine.md
@@ -0,0 +1,5 @@
1
+---
2
+"@ultraviolet/form": patch
3
4
+
5
+Fix `<SelectInputFieldV2 />` to call `onChange` only after changing field state
packages/form/src/components/SelectInputFieldV2/index.tsx
@@ -102,8 +102,8 @@ export const SelectInputFieldV2 = <
102
typeof SelectInputV2<typeof multiselect>
103
>['onChange'] = useCallback(
104
(value: string | string[]) => {
105
- onChange?.(value as PathValue<TFieldValues, TFieldName>)
106
field.onChange(value)
+ onChange?.(value as PathValue<TFieldValues, TFieldName>)
107
},
108
[onChange, field],
109
)
0 commit comments