OptionaldebugOptional log string to identify the listener in console logs.
OptionalignoreIf true, fires all listeners once immediately when the component mounts
or when the source changes, allowing initialization based on current model state.
OptionaltransactionalWhether the listener takes part in the operation that notifies it.
true when the listener is added through the object a batch hands its
callback (IWorkbook.doBatch, IWorksheet.doBatch, ICellRange.doBatch),
and false otherwise - however long a batch stays open.
A script, or code acting for one, adds its listeners through its batch and takes part by default. A view, or anything else watching the document, adds them the ordinary way and is an observer by default. Neither needs to set this.
A participant hears what is announced while an operation is under way. A worksheet announces
each write as it is made (IWorksheet.Events.onDataChange, onStyleChange,
onMergesChange, onSpillsChange), so a participant hears each write and an observer hears
the operation once, every write merged. An event that is announced only once the operation
has landed never reaches a participant; to hear one from a batch, add the listener with
transactional: false.
A transactional listener:
A non-transactional listener:
Options for
ModelListenerOptionshook.Remarks
This is extends IListener.Options but removes 'once' since hooks are evaluated on render and adds a
ignoreModelChangeoption.