@linzjs/step-ag-grid 21.2.1 → 21.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "21.2.1",
5
+ "version": "21.3.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -39,6 +39,7 @@ export interface GridBaseRow {
39
39
 
40
40
  export interface GridProps {
41
41
  readOnly?: boolean; // set all editables to false when read only, make all styles black, otherwise style is gray for not editable
42
+ defaultPostSort?: boolean; // Retain sort order after edit, Defaults to true.
42
43
  selectable?: boolean;
43
44
  theme?: string; // should have prefix ag-theme-
44
45
  ["data-testid"]?: string;
@@ -114,6 +115,7 @@ export interface GridProps {
114
115
  */
115
116
  export const Grid = ({
116
117
  "data-testid": dataTestId,
118
+ defaultPostSort = true,
117
119
  rowSelection = "multiple",
118
120
  suppressColumnVirtualization = true,
119
121
  theme = "ag-theme-step-default",
@@ -742,7 +744,7 @@ export const Grid = ({
742
744
  onModelUpdated={onModelUpdated}
743
745
  onGridReady={onGridReady}
744
746
  onSortChanged={ensureSelectedRowIsVisible}
745
- postSortRows={params.onRowDragEnd ? undefined : postSortRows}
747
+ postSortRows={params.onRowDragEnd || !defaultPostSort ? undefined : postSortRows}
746
748
  onSelectionChanged={synchroniseExternalStateToGridSelection}
747
749
  onColumnMoved={params.onColumnMoved}
748
750
  alwaysShowVerticalScroll={params.alwaysShowVerticalScroll}