@linzjs/step-ag-grid 17.0.0 → 17.0.2

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/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  - Custom form
19
19
  - Context menu
20
20
 
21
- _Please note this requires React >=17, ag-grid-community >=27, and sass._
21
+ _Please note this requires React >=17, ag-grid-community >=28, and SASS._
22
22
 
23
23
  ## Install
24
24
 
@@ -81,7 +81,7 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
81
81
  }
82
82
 
83
83
  .ag-header .ag-header-cell[aria-colindex="1"] {
84
- padding-left: lui.$unit-rg;
84
+ padding-left: 17px;
85
85
  }
86
86
 
87
87
  .ag-cell[role="gridcell"] {
@@ -90,7 +90,7 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
90
90
  }
91
91
 
92
92
  .ag-cell[aria-colindex="1"] {
93
- border-left: none;
93
+ border-left: 1px solid transparent;
94
94
  padding-left: lui.$unit-rg;
95
95
  }
96
96
 
@@ -0,0 +1,3 @@
1
+ export declare const waitForGridReady: ({ canvasElement }: {
2
+ canvasElement: HTMLElement;
3
+ }) => Promise<void>;
@@ -2533,8 +2533,8 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2533
2533
  {
2534
2534
  colId: "selection",
2535
2535
  editable: false,
2536
- minWidth: 42,
2537
- maxWidth: 42,
2536
+ minWidth: 48,
2537
+ maxWidth: 48,
2538
2538
  pinned: selectColumnPinned,
2539
2539
  headerComponentParams: {
2540
2540
  exportable: false,
@@ -4614,7 +4614,7 @@ const GridContextProvider = (props) => {
4614
4614
  /**
4615
4615
  * Get ColDefs, with flattened ColGroupDefs
4616
4616
  */
4617
- const getColumns = React.useCallback((filterDef = () => true) => lodashEs.filter(columnApi?.getAllColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4617
+ const getColumns = React.useCallback((filterDef = () => true) => lodashEs.filter(columnApi?.getColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4618
4618
  const getColumnIds = React.useCallback((filterDef = () => true) => lodashEs.compact(getColumns(filterDef).map(getColId)), [getColumns]);
4619
4619
  /**
4620
4620
  * Internal method for selecting and flashing rows.
@@ -4886,9 +4886,14 @@ const GridContextProvider = (props) => {
4886
4886
  return ok;
4887
4887
  });
4888
4888
  }, [gridApiOp, modifyUpdating, selectNextEditableCell]);
4889
- const redrawRows = React.useCallback((rowNodes) => {
4890
- gridApiOp((gridApi) => gridApi.redrawRows(rowNodes ? { rowNodes } : undefined));
4891
- }, [gridApiOp]);
4889
+ const redrawRows = React.useMemo(() => debounce((rowNodes) => {
4890
+ try {
4891
+ gridApi && gridApi.redrawRows(rowNodes ? { rowNodes } : undefined);
4892
+ }
4893
+ catch (ex) {
4894
+ console.error(ex);
4895
+ }
4896
+ }, 50), [gridApi]);
4892
4897
  // waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
4893
4898
  const externallySelectedItemsAreInSyncRef = React.useRef(false);
4894
4899
  React.useEffect(() => {