Batch edit of one table (tableScope.batchEditService): collects changes instead of writing them, shows them (ge-table-cell-pending) and writes them on commit. Use TableApi.startBatchEdit, TableApi.commitBatchEdit, TableApi.cancelBatchEdit and TableApi.getPendingChanges.

The pending values belong to the row objects – sorting and filtering keep them on their rows. They are shown, but sorting, filtering, totals, copy and the Excel export use the written data (like ag-Grid).

Since

1.1.96

Hierarchy

  • BatchEditService

Constructors

Accessors

Methods

  • The value a body cell shows: the pending value, otherwise the model value.

    Parameters

    • rowIndex: number

      display index

    • columnIndex: number

      model index

    Returns unknown

    the shown value

  • Forgets pending values of rows that are no longer in the model (setRows, a reloaded tree): they would never be shown, block a commit with an invalid value and be written into stale objects. Only for models whose rows are known (object arrays, trees, row groupings); others keep their entries.

    Returns number

    the number of removed entries

  • Puts pending entries back (undo/redo of a batch edit step): an entry is set as it was, none removes the cell's pending value. Reports onBatchEditChanged "change"; the caller repaints.

    Parameters

    • cells: {
          entry?: PendingCellIf;
          property: string;
          rowKey: unknown;
      }[]

      the cells

    • announce: boolean = true

    Returns CellChangeIf<any>[]

    the cells with their display index (-1 if not shown)

    Since

    1.1.99