v3.8.0
New Features
- Added
onSet
property toFormProvider
when used in controlled fashion. This allows to dispatch "set form attributes" action with additional options. The only supported option isvalidate
, which allows to skip validation when setting new attributes, and form is in "validate on change" state.
const onSet = useCallback((setAttrs) => {
setAttrs({ validate: false });
}, []);
return (
<FormProvider
attrs={attrs}
onChange={onChange}
onSet={onSet}
>
<OrderForm />
</FormProvider>
);