@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.
- package/CHANGELOG.md +8 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/create-form.tsx +9 -3
package/src/create-form.tsx
CHANGED
@@ -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 {
|
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>
|