@linzjs/step-ag-grid 17.4.4 → 17.4.6

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.
@@ -2770,7 +2770,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2770
2770
  }, []);
2771
2771
  const onRowDragEnd = React.useCallback(async (event) => {
2772
2772
  const clientSideRowModel = event.api.getModel();
2773
- if (event.node.rowIndex) {
2773
+ if (event.node.rowIndex != null) {
2774
2774
  const lastHighlightedRowNode = clientSideRowModel.getLastHighlightedRowNode();
2775
2775
  const isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === agGridCommunity.RowHighlightPosition.Below;
2776
2776
  let targetIndex = event.overIndex;
@@ -2783,7 +2783,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2783
2783
  const moved = event.node.data;
2784
2784
  const target = event.overNode?.data;
2785
2785
  moved.id != target.id && //moved over a different row
2786
- moved.rowIndex != targetIndex && //moved to a different index
2786
+ event.node.rowIndex != targetIndex && //moved to a different index
2787
2787
  params.onRowDragEnd &&
2788
2788
  (await params.onRowDragEnd(moved, target, targetIndex));
2789
2789
  }
@@ -25593,7 +25593,16 @@ const findRow = async (rowId, within) => {
25593
25593
  await waitForWrapper(async () => {
25594
25594
  expect(getAllQuick({ classes: ".ag-row" }).length > 0).toBe(true);
25595
25595
  });
25596
- return await findQuick({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);
25596
+ //if this is not wrapped in an act console errors are logged during testing
25597
+ let row;
25598
+ await act(async () => {
25599
+ row = await findQuick({ tagName: `.ag-center-cols-container div[row-id='${rowId}']:not(:empty)` }, within);
25600
+ const leftCols = await findQuick({ tagName: `.ag-pinned-left-cols-container div[row-id='${rowId}']` }, within);
25601
+ const rightCols = await findQuick({ tagName: `.ag-pinned-right-cols-container div[row-id='${rowId}']` }, within);
25602
+ const combineChildren = [...leftCols.children, ...row.children, ...rightCols.children];
25603
+ row.replaceChildren(...combineChildren);
25604
+ });
25605
+ return row;
25597
25606
  };
25598
25607
  const queryRow = async (rowId, within) => {
25599
25608
  return queryQuick({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);