Interface useWorkbookRangeOptions

Range listeners are used to listen to changes to a range.

interface useWorkbookRangeOptions {
    absolute?: boolean;
    fireOnAddressChange: boolean;
    fromEvent?: SheetRangeEvent;
    ignoreCellUpdates?: boolean;
    ignoreStyleUpdates?: boolean;
    weakly?: boolean;
    withinTransaction?: boolean;
}

Hierarchy (view full)

Properties

absolute?: boolean

The actual range can also change due to insert/removes or delete of a sheet. Setting absoluteCoords to true will ignore shifts in the range.

Default Value

false
fireOnAddressChange: boolean
fromEvent?: SheetRangeEvent

Used for undo notification. If provided this will also fire a range event on add.

ignoreCellUpdates?: boolean

Ignore cell updates. This will fire events if the range has shifted but will not fire events for cells updates

Default Value

false
ignoreStyleUpdates?: boolean
weakly?: boolean

If true then the listener will be weakly held.

Default Value

false
withinTransaction?: boolean

Range listeners are always part of the transaction stack. This means that the range listener will not be called on undo events before it was added. The within transaction flag will allow the listener to be called on all incremental changes.

This is useful for operations that want to write with the same transaction. This has several implications.

  1. The listener will be fired for all incremental changes during the transaction.
  2. The range operators can be written too.
  3. Listeners will not be fired on undo as these are handled by transaction state.

Remarks

Default Value

false