CreateUpdateModal
A modal form for creating or updating records via API. Supports FormModel or v-model + Zod schema paths.
Install: pnpm add-component CreateUpdateModal
Create record
Opens a modal with a schema-driven form and POSTs to the API on submit.
API
isOpen(boolean): Whether the modal is visible.apiPath(string): API endpoint for create (POST) or update (PATCH).method('post' | 'patch'): HTTP method — post for create, patch for update.title(string): Modal header title.description(string): Optional subtitle below the title.fields(FormFieldRow[]): Field schema passed to AppForm.schema(ZodType): Zod validation schema (v-model path).initialData(Record<string, unknown>): Pre-filled form values for edit mode.successMessage(string): Toast message on success.submitLabel(string): Label for the submit button.