@saas-ui/forms 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,13 +47,19 @@ export function createForm<FieldDefs>({
47
47
  props: WithFields<FormProps<TSchema, TFieldValues, TContext>, FieldDefs>,
48
48
  ref: ForwardedRef<HTMLFormElement>
49
49
  ) => {
50
- const { schema, ...rest } = props
50
+ const {
51
+ schema,
52
+ resolver: resolverProp,
53
+ fieldResolver: fieldResolverProp,
54
+ ...rest
55
+ } = props
56
+
51
57
  return (
52
58
  <FieldsProvider value={fields || {}}>
53
59
  <Form
54
60
  ref={ref}
55
- resolver={resolver?.(props.schema)}
56
- fieldResolver={fieldResolver?.(schema)}
61
+ resolver={resolverProp ?? resolver?.(props.schema)}
62
+ fieldResolver={fieldResolverProp ?? fieldResolver?.(schema)}
57
63
  {...rest}
58
64
  />
59
65
  </FieldsProvider>