Skip to content

v3.8.0

Compare
Choose a tag to compare
@akuzko akuzko released this 23 May 19:28
· 11 commits to master since this release

New Features

  • Added onSet property to FormProvider when used in controlled fashion. This allows to dispatch "set form attributes" action with additional options. The only supported option is validate, 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>
);