SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface UseEditCommitOptions<V>

    interface UseEditCommitOptions<V> {
        changeOn?: "done" | "live";
        initialText?: string;
        onChange?: (value: V | null) => void;
        onChangeText?: (text: string) => void;
        onDone?: (value: V | null, args: EditDoneArgs) => void;
        parse: (text: string) => EditParseResult<V>;
        session: EditCommitSession;
    }

    Type Parameters

    • V
    Index
    changeOn?: "done" | "live"

    'done' suppresses the live onChange notifications entirely (parsing still runs, so the error state and the commit-channel value stay current) and makes Enter the field's OWN commit point rather than a key the host form gets to see. Default 'live'.

    initialText?: string

    The display text at mount (the committed value, serialized).

    onChange?: (value: V | null) => void

    The live PREVIEW channel — every valid text state.

    onChangeText?: (text: string) => void

    The raw TEXT channel: every display-text change the user causes (typed, picked, reverted) — INVALID states included, and regardless of changeOn.

    For hosts that persist authored text rather than a parsed value (an editor writing through to a draft, which validates at save): onChange would leave them holding the last VALID text while the field shows something else. An outside resetCommitted does NOT fire it — the host already has that text.

    onDone?: (value: V | null, args: EditDoneArgs) => void

    The COMMIT channel — see EditCommitApi.notifyDone.

    parse: (text: string) => EditParseResult<V>

    Text → value (or an error key). Called on every text state; must not throw.

    The host's modal-edit SESSION, as the commit policy needs to see it. What a session is differs per field — a formula field is engaged on the reference-mode bus (grid picks write into it); a plain field is simply focused — but the done rules only need "is one open" and "end it".