Browse Source

docs(form-ui): document zod default normalization

pull/8372/head
kilisamemarisaaa 3 weeks ago
parent
commit
42f282840e
  1. 4
      packages/@core/ui-kit/form-ui/src/use-form-context.ts

4
packages/@core/ui-kit/form-ui/src/use-form-context.ts

@ -34,6 +34,10 @@ export const [injectFormProps, provideFormProps] =
export const [injectComponentRefMap, provideComponentRefMap] =
createContext<Map<string, unknown>>('ComponentRefMap');
/**
* Rebuild the schema used by zod-defaults, replacing native format nodes that
* zod-defaults does not recognise while retaining supported wrappers.
*/
function normalizeSchemaForDefaults(rule: ZodType): ZodType {
const rawRule = toRaw(rule) as any;

Loading…
Cancel
Save