SheetXL - v1.0.2
    Preparing search index...

    Interface CellRangeHookOptions

    Options shared by the cell-binding hooks.

    interface CellRangeHookOptions {
        anchor?: Type;
        edits?: boolean;
        ignoreAddressChanges?: boolean;
        ignoreDataChanges?: boolean;
        once?: boolean;
        onChange?: Listener<ICellRange>;
        weakly?: boolean;
    }

    Hierarchy

    • Omit<ICellRange.ListenerOptions, "transactional">
      • CellRangeHookOptions
    Index
    anchor?: Type

    How the listened range follows rows and columns inserted or deleted around it.

    IAnchored.Type.TwoCell

    • TwoCell: the range follows its cells, as a formula reference does. An insert above it moves it down, a delete inside it shrinks it, and deleting all of its cells makes it #REF!. Each move is an 'address' event.
    • OneCell: the top-left follows its cell and the extent is kept, as a picture anchored to one cell. Deleting the top-left cell leaves the range where it is.
    • Absolute: the range never moves. It names the same addresses whatever is inserted or deleted, so it never has an 'address' event. This is what a view listening to the rows it shows wants: the cells on screen, not the cells that were there when it subscribed.
    edits?: boolean

    Whether an 'address' event carries the edits that changed the range's cells (Event.getEdits).

    false
    

    With it, the listener is also told of a cut that takes only some of its cells: the range itself stays (a cut moves a reference only when it takes all of it), but the cells it names were moved, and the event says where.

    ignoreAddressChanges?: boolean

    If true, the listener will not be called when the range's address changes (due to row/column insert/delete, moves, or a rename of the sheet a qualified range names). The range still follows its cells; see anchor for a range that should not.

    false
    
    ignoreDataChanges?: boolean

    If true, the listener will not be called when the data within the range changes.

    false
    
    once?: boolean

    If true then will auto deregister once fired.

    onChange?: Listener<ICellRange>

    Called with every change event the hook receives, before it re-renders.

    Uses the hook's own subscription. To receive events without re-rendering, use useRangeListener instead.

    weakly?: boolean

    If true then the listener will be weakly and will be auto removed it the listener is gc'ed.

    false