Closed besatanas closed 5 years ago
Same issue here.
The problem is that the draggedItems
list in the Reorder-GridRowDragger is set to the dragged items when the drag is started, but is never cleared when the drag is finished, as the drop is performed on another component.
Now, dragging the item back into the grid, the Reorder-GridRowDragger finds a filled draggedItems
list and adds the item to the Grid, even though the items are coming from another component.
Up?
Hello there!
We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.
There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!
we have exactly the same behavior
Hello Kalomo, Seems no priority on that issue.
But still available at 8.6.0 version
After a long internal discussion we decided to not change the current behaviour of the GridRowDragger as it might cause unexpected behaviour and break existing code. It is intended that there is only one GridRowDragger per Grid. Unfortunately we missed to document that properly and are very sorry about that and the trouble that was caused by this.
As an immediate workaround, you have to keep track of the dragged items manually and update the data provider for the grids manually with the GridDropListeners (sadly that requires creation of a new DataProvider).
For the upcoming 8.7 release we will improve the API and add more info to the criteria script within GridDropTargetConnector (see https://github.com/vaadin/framework/pull/11321) which will allow for an easier workaround.
Framework version 8.3.1
We wanted to DnD beween 2 grids (Right to Left and LeftTo Right) and also being able to reorder inside one of the 2 grids (left one).
To reproduce the bug, you need to provide an arrayList with values on the right grid, left grid is empty. 1: drag multiples object from right to left (More than 1) 2: drag back the 'dragged objets' from left to right until left grid is empty. 3: drag back 1 object from right to left and the object will be duplicated in the left grid.
if I remove the leftToLeft GridRowDragger, the issues doesn't happend.
As far as I can see, when dragging right to left, both leftToLeft and rightToLeft DropListener are firered.