ag-grid/ag-grid-enterprise

Row Dragging cannot read property foreach of undefined

shubhamchawla opened this issue · 3 comments

While trying to drag a row in Ag-Grid having Grouping and Unmanaged Dragging while dragging row from group 1 to far away group in which auto scrolling occurs then i am getting error generated in console from ag-grid-community.cjs.js file. Below is the stack trace from console -

ag-grid-community.cjs.js:26975 Uncaught TypeError: Cannot read property 'forEach' of undefined at RowDragFeature.webpackJsonp../node_modules/ag-grid-community/dist/ag-grid-community.cjs.js.RowDragFeature.stopDragging (ag-grid-community.cjs.js:26975) at RowDragFeature.webpackJsonp../node_modules/ag-grid-community/dist/ag-grid-community.cjs.js.RowDragFeature.onDragStop (ag-grid-community.cjs.js:26966) at DragAndDropService.webpackJsonp../node_modules/ag-grid-community/dist/ag-grid-community.cjs.js.DragAndDropService.onDragStop (ag-grid-community.cjs.js:17368) at DragService.webpackJsonp../node_modules/ag-grid-community/dist/ag-grid-community.cjs.js.DragService.onUpCommon (ag-grid-community.cjs.js:31179) at DragService.webpackJsonp../node_modules/ag-grid-community/dist/ag-grid-community.cjs.js.DragService.onMouseUp (ag-grid-community.cjs.js:31174) at HTMLDocument.mouseUpEvent (ag-grid-community.cjs.js:31074)

I have the same issue. Please help on this.

Steps to reproduce this issue -
Set the getRowDropZoneParams for the target grid.
Set the property "rowDragManaged" on both grids to be false.
Try to drag and drop a row between two grids (source grid to target grid)
You would get the error.

More Info -
Ag-Grid-Enterprise: version-23.2.1
Browser- Chrome: version-Version 90.0.4430.212
Language: Angular:version-10.0.2

Screen Shot 2021-06-02 at 20 15 37

The issue does not happen when rowDragManaged set to be true for both the grids.

Please help me to resolve this issue.

Do comment if more info required.

This issue was fixed in ag-grid v24. Can you please try that?

Hi @shubhamchawla!

Thank you for opening this github issue.

You opened this issue in a legacy repository instead of the main one, which is why we've not responded to it earlier.

As this issue was submitted over a year ago and many improvements were made to the grid in this time, please upgrade to the latest version of AG Grid and verify whether you can still see this issue. If you still have this issue with the latest version, please submit a new github issue in the main AG Grid repository with a reproduction example.

We will now close this issue and archive this repository soon to avoid any further confusion. If you want to open any new issues, please report them under the main repository to ensure they are processed promptly and seen by the entire AG Grid community:
https://github.com/ag-grid/ag-grid/issues