@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.
@@ -2749,7 +2749,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2749
2749
  }, []);
2750
2750
  const onRowDragEnd = useCallback(async (event) => {
2751
2751
  const clientSideRowModel = event.api.getModel();
2752
- if (event.node.rowIndex) {
2752
+ if (event.node.rowIndex != null) {
2753
2753
  const lastHighlightedRowNode = clientSideRowModel.getLastHighlightedRowNode();
2754
2754
  const isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === RowHighlightPosition.Below;
2755
2755
  let targetIndex = event.overIndex;
@@ -2762,7 +2762,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2762
2762
  const moved = event.node.data;
2763
2763
  const target = event.overNode?.data;
2764
2764
  moved.id != target.id && //moved over a different row
2765
- moved.rowIndex != targetIndex && //moved to a different index
2765
+ event.node.rowIndex != targetIndex && //moved to a different index
2766
2766
  params.onRowDragEnd &&
2767
2767
  (await params.onRowDragEnd(moved, target, targetIndex));
2768
2768
  }
@@ -25572,7 +25572,16 @@ const findRow = async (rowId, within) => {
25572
25572
  await waitForWrapper(async () => {
25573
25573
  expect(getAllQuick({ classes: ".ag-row" }).length > 0).toBe(true);
25574
25574
  });
25575
- return await findQuick({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);
25575
+ //if this is not wrapped in an act console errors are logged during testing
25576
+ let row;
25577
+ await act(async () => {
25578
+ row = await findQuick({ tagName: `.ag-center-cols-container div[row-id='${rowId}']:not(:empty)` }, within);
25579
+ const leftCols = await findQuick({ tagName: `.ag-pinned-left-cols-container div[row-id='${rowId}']` }, within);
25580
+ const rightCols = await findQuick({ tagName: `.ag-pinned-right-cols-container div[row-id='${rowId}']` }, within);
25581
+ const combineChildren = [...leftCols.children, ...row.children, ...rightCols.children];
25582
+ row.replaceChildren(...combineChildren);
25583
+ });
25584
+ return row;
25576
25585
  };
25577
25586
  const queryRow = async (rowId, within) => {
25578
25587
  return queryQuick({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);