View as Markdown

API reference: @salmonui/editors/inline-edit

InlineEditApiinterface

import type { InlineEditApi } from '@salmonui/editors/inline-edit';
interface InlineEditApi {
    readonly element: HTMLSpanElement | null;
    startEdit(): void;
    save(): Promise<boolean>;
    cancelEdit(): void;
    validate(): Promise<readonly string[]>;
}

Ref handle: the Data Grid edit method names.

InlineEditApi members (5)
NameSignatureDescription
elementreadonly element: HTMLSpanElement | null;

The root element.

startEditstartEdit(): void;
savesave(): Promise<boolean>;

Saves the draft; resolves to true when the value was saved.

cancelEditcancelEdit(): void;
validatevalidate(): Promise<readonly string[]>;

Validates the draft (or the saved value when idle) and resolves to the error list.