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

    Interface EditMode<T>

    A single entry on the application's edit-mode bus: the interaction currently in effect — for example editing a cell, a copy/cut marquee, or a fill/drag gesture.

    Exactly one EditMode is active at a time, or none (idle). A feature signals that its interaction has begun by publishing an EditMode, and clears it when the interaction ends. See EditModeHandler for how the bus is read and written.

    interface EditMode<T = any> {
        args?: T;
        cancel?: () => void;
        cursor?: string;
        description?: string;
        done?: () => void;
        key: string;
        onModeChange?: (newMode: EditMode<any> | null) => void;
    }

    Type Parameters

    Index
    args?: T

    Mode-specific payload for consumers that need more than the EditMode.key — for example a handle to the live editor during a cell edit, or flags describing a clipboard operation.

    cancel?: () => void

    Runs when the user cancels the mode from chrome (the status bar's ✕ beside the description); the publisher ends the mode. Supply the same action the mode's Escape takes. When omitted, the chrome offers no cancel for the mode.

    cursor?: string

    Cursor to show while the mode is active (any CSS cursor value), e.g. 'crosshair' for a fill drag. Applied by whichever surface owns the pointer.

    description?: string

    Human-readable label for the mode, shown to the user (e.g. in the status bar). When omitted, the UI falls back to its idle text.

    done?: () => void

    Runs when the user completes the mode from chrome (the status bar's ✓ beside the description): the publisher performs the mode's action and ends the mode. Supply the same action the mode's Enter takes (commit an edit, paste a marquee). When omitted, the chrome offers no complete for the mode; a gesture that completes on its own release (a drag) has none.

    key: string

    Stable identifier for the kind of interaction (e.g. 'edit', 'copy', 'fill'). Consumers switch on this to recognize a mode they care about.

    onModeChange?: (newMode: EditMode<any> | null) => void

    Invoked when this mode is replaced (or cleared), receiving the incoming mode or null. Use it to tear down anything the mode set up — e.g. a copy mode clears the clipboard when it is superseded.