Interface TransactionService<T, S>

Type Parameters

Hierarchy

Hierarchy

Implemented by

Properties

canRedo: boolean

Returns

if there are any transactions in the Redo stack

canUndo: boolean

Returns

if there are any transactions in the Undo stack

cloneStrategy: IDataCloneStrategy

Gets/Sets the data clone strategy used to clone data

enabled: boolean

Returns whether transaction is enabled for this service

onStateUpdate?: EventEmitter<StateUpdateEvent>

Event fired when transaction state has changed - add transaction, commit all transactions, undo and redo

Methods

  • Returns aggregated changes from all transactions

    Returns

    Collection of aggregated transactions for each changed record

    Parameters

    • mergeChanges: boolean

      If set to true will merge each state's value over relate recordRef and will record resulting value in the related transaction

    Returns T[]

  • Returns value of the required id including all uncommitted changes

    Returns

    Value with changes or null

    Parameters

    • id: any

      The id of the record to return value for

    • mergeChanges: boolean

      If set to true will merge state's value over relate recordRef and will return merged value

    Returns any