Grid Service new CRUD methods
Quick Summary
This version introduce a lot of refactoring on the CRUD methods (with an extra newly added upsert
method) available in the Grid Service (which is now fully tested). New method names are replacing the older methods (which will be deprecated in the future). The biggest change is that instead of passing true, false, true
(which is not very explanatory), was converted to an object with the flag properties, see below). All option flags still have their own defaults when no flag are provided (highlightRow: false, selectRow: true, triggerEvent: true
), for example:
Before
this.angularGrid.gridService.updateDataGridItem(item, false, true);
After
this.angularGrid.gridService.updateItem(item, { highlightRow: false, selectRow: true });
- All the flags in the 2nd argument are optional, they do come with their own defaults, see the Wiki to know them.
Features
- (gridService); change all CRUD methods to options argument
- (gridService): add "selectRow" flag to all CRUD methods
- (tests): add Grid Service full unit test suite
- (demo): add custom formatter with onCellClick, closes #213
- (resizer): change onGridBeforeResize to return event, issue #215 (PR #216)
Fixes
- (highlight): should do just that without doing any row selection
- using the new CRUD methods, the row won't be selected after the action, it will only be highlighted like it should
- (highlight): add highlight fade out animation
- fix(core): previous core version broke column resize, closes #207