Class · v2.6.0
NgbDatagridDefaultEditService
Default immutable edit service that tracks original rows and removes unsaved new rows on cancel.
Import
import { NgbDatagridDefaultEditService } from '@angular-bootstrap/ngbootstrap';Declaration
class NgbDatagridDefaultEditService<T> implements NgbDatagridEditService<T>Methods
create
create(data: readonly T[], newRow: T, _rowIndex: number, rowId: NgbDatagridRowId): T[]update
update(data: readonly T[], updatedRow: T, rowIndex: number, rowId: NgbDatagridRowId): T[]remove
remove(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[]assignValues
assignValues(row: T, values: Partial<T>): TisNew
isNew(rowId: NgbDatagridRowId): booleanhasChanges
hasChanges(rowId: NgbDatagridRowId, currentRow: T): booleansaveChanges
saveChanges(data: readonly T[], _rowIndex: number, rowId: NgbDatagridRowId, _currentRow: T): T[]cancelChanges
cancelChanges(data: readonly T[], rowIndex: number, rowId: NgbDatagridRowId): T[]