@linzjs/step-ag-grid 17.4.4 → 17.4.5
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/dist/step-ag-grid.cjs.js
CHANGED
|
@@ -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
|
-
|
|
2786
|
+
event.node.rowIndex != targetIndex && //moved to a different index
|
|
2787
2787
|
params.onRowDragEnd &&
|
|
2788
2788
|
(await params.onRowDragEnd(moved, target, targetIndex));
|
|
2789
2789
|
}
|