| Prop | Default | Type |
|---|---|---|
activationMode | 'focus' | 'dblclick' | 'focus' | 'none'The activation event of the editable field |
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
autoResize | false | booleanWhether the editable field should auto resize |
defaultValue | stringThe default value of the editable field | |
dir | 'ltr' | 'rtl'The reading direction of the calendar when applicable. | |
disabled | false | booleanWhether the editable field is disabled |
id | stringThe id of the field | |
maxLength | numberThe maximum number of characters allowed | |
modelValue | string | nullThe value of the editable field | |
name | stringThe name of the field. Submitted with its owning form as part of a name/value pair. | |
placeholder | 'Enter text...' | string | { edit: string; preview: string; }The placeholder for the editable field |
readonly | booleanWhether the editable field is read-only | |
required | false | booleanWhen |
selectOnFocus | false | booleanWhether to select the text in the input when it is focused. |
startWithEditMode | booleanWhether to start with the edit mode active | |
submitMode | 'blur' | 'blur' | 'none' | 'enter' | 'both'The submit event of the editable field |
| Emit | Payload |
|---|---|
submit | [value: string | null]Event handler called when a value is submitted |
update:modelValue | [value: string]Event handler called whenever the model value changes |
update:state | [state: 'cancel' | 'submit' | 'edit']Event handler called when the editable field changes state |
| Slots (default) | Payload |
|---|---|
isEditing | booleanWhether the editable field is in edit mode |
modelValue | string | null | undefinedThe value of the editable field |
isEmpty | booleanWhether the editable field is empty |
submit | (): voidFunction to submit the value of the editable |
cancel | (): voidFunction to cancel the value of the editable |
edit | (): voidFunction to set the editable in edit mode |
| Methods | Type |
|---|---|
submit | () => voidFunction to submit the value of the editable |
cancel | () => voidFunction to cancel the value of the editable |
edit | () => voidFunction to set the editable in edit mode |
