← DataGrid API

Directive · v2.7.0

NgbDataGridHistoryDirective

Opt-in history for configuration changes and saved edits to existing rows.

Import

import { NgbDataGridHistoryDirective } from '@angular-bootstrap/ngbootstrap';

Selector:ngb-datagrid[ngbGridHistory]

Declaration

Inputs

historyKeyboard

Scoped shortcuts; editable fields retain native text undo.

historyKeyboard: boolean

Default:true

historyLimit

Maximum retained undo steps (1–1000); the current configuration is separate.

set historyLimit(value: number) get historyLimit(): number

Outputs

historyKeyboardResult

historyKeyboardResult: EventEmitter<NgbDataGridHistoryResult>

Properties

busy

readonly busy: i0.Signal<boolean>

undoCount

readonly undoCount: i0.Signal<number>

redoCount

readonly redoCount: i0.Signal<number>

ready

readonly ready: i0.Signal<boolean>

error

readonly error: i0.Signal<string>

canUndo

readonly canUndo: i0.Signal<boolean>

canRedo

readonly canRedo: i0.Signal<boolean>

Methods

record

Record application-driven input changes after Angular has applied those inputs.

clear

Discard both stacks and use the current configuration as a new baseline.

undo

redo

undoAsync

Use these methods when batch editing is enabled; ordinary commands remain synchronous internally.

undoAsync(): Promise<NgbDataGridHistoryResult>

redoAsync

redoAsync(): Promise<NgbDataGridHistoryResult>

onHistoryKeydown

onHistoryKeydown(event: KeyboardEvent): Promise<void>

Referenced types

Source: src/datagrid/src/views/datagrid-history.directive.ts in the installed @angular-bootstrap/ngbootstrap package. Angular compiler metadata and private members are omitted.

This project is not affiliated with ng-bootstrap or ngx-bootstrap. Those projects focus mainly on Bootstrap components for Angular. ngbootstrap focuses on Angular UI for data-heavy apps, especially Data Grid, Angular-native Form Builder, drag and drop workflows, documentation examples, and performance-focused Angular patterns.