IInlineEditProps

interface
Form & Input

Props contract for OrigamInlineEdit — the edit-in-place component. Controls validation rules, auto-focus, select-on-focus, confirm/cancel triggers, multiline mode, and built-in action buttons.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

modelValue
requis
string | number
Current value (v-model target). Accepts string or number.
placeholder
string
Placeholder shown on the input and in the default display slot when the value is empty.
rules
Array<TInlineEditRule>
Array of validation rules evaluated on confirm. First failure blocks the commit.
validate
TInlineEditValidator
Sync or async validation callback. Runs after rules pass. Returns true or an error message.
autoFocus
boolean
true
Auto-focus the input when entering edit mode.
selectOnFocus
boolean
true
Select all text when the input gains focus on edit entry.
confirmOnBlur
boolean
true
Confirm the draft when the input loses focus.
confirmOnEnter
boolean
true
Confirm on Enter. Disable for multiline mode where Enter should insert a newline.
cancelOnEscape
boolean
true
Cancel (revert) the draft on Escape.
disabled
boolean
false
Disables the component. The display affordance becomes non-interactive.
multiline
boolean
false
Render a <textarea> instead of <input> in edit mode.
trim
boolean
true
Strip surrounding whitespace before emitting and validating.
inputType
TInlineEditInputType
'text'
Native HTML input type when not in multiline mode.
loadingOnConfirm
boolean
false
Surface a loading affordance (CSS class hook) while an async validator is in flight.
showActions
boolean
false
Render built-in Edit / Confirm / Cancel icon buttons next to the component.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Edit-in-place title with async validation

vue