diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index 40a63868..6218dbe5 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -38,6 +38,13 @@ export const Index = { component: () => import("../src/lib/registry/default/example/AspectRatioDemo.vue").then((m) => m.default), files: ["../src/lib/registry/default/example/AspectRatioDemo.vue"], }, + "AutoFormApi": { + name: "AutoFormApi", + type: "components:example", + registryDependencies: ["button","toast","auto-form"], + component: () => import("../src/lib/registry/default/example/AutoFormApi.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/AutoFormApi.vue"], + }, "AutoFormArray": { name: "AutoFormArray", type: "components:example", @@ -1327,6 +1334,13 @@ export const Index = { component: () => import("../src/lib/registry/new-york/example/AspectRatioDemo.vue").then((m) => m.default), files: ["../src/lib/registry/new-york/example/AspectRatioDemo.vue"], }, + "AutoFormApi": { + name: "AutoFormApi", + type: "components:example", + registryDependencies: ["button","toast","auto-form"], + component: () => import("../src/lib/registry/new-york/example/AutoFormApi.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/AutoFormApi.vue"], + }, "AutoFormArray": { name: "AutoFormArray", type: "components:example", diff --git a/apps/www/src/content/docs/components/auto-form.md b/apps/www/src/content/docs/components/auto-form.md index 9d0925b5..72f2e7ea 100644 --- a/apps/www/src/content/docs/components/auto-form.md +++ b/apps/www/src/content/docs/components/auto-form.md @@ -28,6 +28,11 @@ Refined schema to validate that two fields match. +### API Example +The form select options are fetched from an API. + + + ### Array support You can use arrays in your schemas to create dynamic forms. diff --git a/apps/www/src/lib/registry/default/example/AutoFormApi.vue b/apps/www/src/lib/registry/default/example/AutoFormApi.vue new file mode 100644 index 00000000..0e8bd37b --- /dev/null +++ b/apps/www/src/lib/registry/default/example/AutoFormApi.vue @@ -0,0 +1,45 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/example/AutoFormApi.vue b/apps/www/src/lib/registry/new-york/example/AutoFormApi.vue new file mode 100644 index 00000000..742b5fb5 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/AutoFormApi.vue @@ -0,0 +1,45 @@ + + +