IUseInlineEditOptions

interface
Composable Options

Options accepted by useInlineEdit. Controls validation rules, trim behaviour, and lifecycle callbacks for the edit-in-place state machine.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

rules
Array<TInlineEditRule>
Array of validation rules — evaluated in order before validate. First failure blocks the commit and surfaces the error message.
validate
TInlineEditValidator
Sync or async validator. Only runs if all rules pass.
invalidMessage
string
trim
boolean
true
Strip surrounding whitespace before running the validator and emitting the new value.
onConfirm
(value: string) => void
Called when the draft is committed. Use this when the composable is consumed outside the SFC emit pipeline.
onCancel
() => void
Called when the draft is discarded.
onError
(message: string) => void
Called when a validator returns an error message.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Using useInlineEdit with validation

typescript