@linzjs/step-ag-grid 27.3.4 → 28.1.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/README.md CHANGED
@@ -275,6 +275,7 @@ test("click Delete menu option removes row from the table", async () => {
275
275
  If your grid has a data-testid a global will be exposed in window with the helper scrollRowIntoViewById.
276
276
  This will throw an exception if the row id is not found.
277
277
 
278
+
278
279
  ```tsx
279
280
  window.__stepAgGrid.grids[dataTestId].scrollRowIntoViewById("1000")
280
281
  ```
@@ -292,3 +292,8 @@ export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: nu
292
292
  waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
293
293
  timeout: props?.timeout ?? 5000,
294
294
  });
295
+
296
+ export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
297
+ const header = await findQuick({ tagName: `.ag-header-cell[col-id='${colId}']` }, within);
298
+ await user.click(header);
299
+ };
@@ -293,3 +293,8 @@ export const waitForGridRows = async (props?: { grid?: HTMLElement; timeout?: nu
293
293
  waitFor(() => expect(getAllQuick({ classes: '.ag-row' }, props?.grid).length > 0).toBe(true), {
294
294
  timeout: props?.timeout ?? 5000,
295
295
  });
296
+
297
+ export const clickColumnHeaderToSort = async (colId: string, within?: HTMLElement): Promise<void> => {
298
+ const header = await findQuick({ tagName: `.ag-header-cell[col-id='${colId}']` }, within);
299
+ await user.click(header);
300
+ };
@@ -3293,7 +3293,7 @@ const GridCellMultiSelectClassRules = {
3293
3293
  .getSelectedNodes()
3294
3294
  ?.map((row) => row.id)
3295
3295
  ?.includes(node.id) &&
3296
- api.getEditingCells().some((cell) => cell.column.getColDef() === colDef));
3296
+ api.getEditingCells().some((cell) => cell.colId === colDef.colId));
3297
3297
  },
3298
3298
  };
3299
3299