@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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "17.4.4",
5
+ "version": "17.4.5",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -612,7 +612,7 @@ export const Grid = ({
612
612
  const onRowDragEnd = useCallback(
613
613
  async (event: RowDragEndEvent) => {
614
614
  const clientSideRowModel = event.api.getModel() as IClientSideRowModel;
615
- if (event.node.rowIndex) {
615
+ if (event.node.rowIndex != null) {
616
616
  const lastHighlightedRowNode = clientSideRowModel.getLastHighlightedRowNode();
617
617
  const isBelow = lastHighlightedRowNode && lastHighlightedRowNode.highlighted === RowHighlightPosition.Below;
618
618
 
@@ -626,7 +626,7 @@ export const Grid = ({
626
626
  const moved = event.node.data;
627
627
  const target = event.overNode?.data;
628
628
  moved.id != target.id && //moved over a different row
629
- moved.rowIndex != targetIndex && //moved to a different index
629
+ event.node.rowIndex != targetIndex && //moved to a different index
630
630
  params.onRowDragEnd &&
631
631
  (await params.onRowDragEnd(moved, target, targetIndex));
632
632
  }