Files
directus/src/components/v-form
Rijk van Zanten 4c2f5dc2ba Change print width to 120 (#671)
* Increase line-width to 120

* Auto-fix 100->120 columns
2020-06-01 16:50:08 -04:00
..
2020-05-19 18:02:04 -04:00
2020-05-15 18:44:21 -04:00
2020-05-15 18:44:21 -04:00
2020-03-12 16:22:08 -04:00
2020-04-23 14:01:27 -04:00
2020-06-01 16:50:08 -04:00

Form

Renders a form using interfaces based on the passed collection name.

Usage

<v-form
	collection="articles"
	:edits.sync="{}"
	:initial-values="{
		title: 'Hello World'
	}"
/>

Props

Prop Description Default
collection The collection of which you want to render the fields --
fields Array of fields to render. This can be used instead of the collection prop --
initialValues Object of the starting values of the fields --
edits The edits that were made after the form was rendered. Being used in v-model --
loading Display the form in a loading state. Prevents the ctx menus from being used and renders skeleton loaders for the fields false

Note: You have to pass either the collection or fields prop.

Slots

n/a

Events

Event Description
input Edits have been updated.

CSS Variables

Variable Default
--v-form-column-width 300px
--v-form-row-max-height calc(var(--v-form-column-width) * 2)
--v-form-horizontal-gap 12px
--v-form-vertical-gap 52px