Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 0cd718f

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
Merge branch 'master' of https://github.com/ghiscoding/Angular-Slickgrid into feature/presets
2 parents 01f1f32 + da67007 commit 0cd718f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Editor } from ".";
2+
3+
export interface EditCommand {
4+
row: number;
5+
cell: number;
6+
editor: Editor | any;
7+
serializedValue: any;
8+
prevSerializedValue: any;
9+
10+
/** Call to commit changes*/
11+
execute: () => void;
12+
13+
/** Call to rollback changes*/
14+
undo: () => void;
15+
}

src/app/modules/angular-slickgrid/models/gridOption.interface.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { GridMenu } from './gridMenu.interface';
99
import { HeaderButton } from './headerButton.interface';
1010
import { HeaderMenu } from './headerMenu.interface';
1111
import { Pagination } from './pagination.interface';
12+
import { Column } from './column.interface';
13+
import { EditCommand } from './editCommand.interface';
1214

1315
export interface GridOption {
1416
/** Defaults to false, which leads to load editor asynchronously (delayed) */
@@ -50,6 +52,9 @@ export interface GridOption {
5052
/** Defaults to false, when enabled will give the possibility to edit cell values with inline editors. */
5153
editable?: boolean;
5254

55+
/** option to intercept edit commands and implement undo support.*/
56+
editCommandHandler?: (item: any, column: Column, command: EditCommand) => void;
57+
5358
/** Do we want to enable asynchronous (delayed) post rendering */
5459
enableAsyncPostRender?: boolean;
5560

0 commit comments

Comments
 (0)