]> source.dussan.org Git - vaadin-framework.git/commit
Add new drop mode ON_GRID for GridDropTarget (#10296)
authorPekka Hyvönen <pekka@vaadin.com>
Wed, 15 Nov 2017 07:56:27 +0000 (09:56 +0200)
committerPekka Maanpää <pekkamaa@vaadin.com>
Wed, 15 Nov 2017 07:56:27 +0000 (09:56 +0200)
commit1066d9897be1bdd2d52e46654a5fd7b246d54ab5
treeeaff7ad3d6660268ebb63f4953ed2b1683a93144
parent2b73e6eb08412e9b37b312421bdda2651095529f
Add new drop mode ON_GRID for GridDropTarget (#10296)

* Add new drop mode ON_GRID for GridDropTarget

Also adds a way to not accept drops on rows when the user has sorted the grid.
This way the bad UX can be avoided for showing the drop indicator for the wrong place when the grid has been sorted.
This has not been made default behavior to GridDropTarget since it would change behavior compared to 8.1.
Instead if is triggerable via API in GridDropTarget.

* Refactor sorted grid drop logic to server side

* Block setDropMode calls

Blocking setDropMode set values if the grid has been sorted and drop on
sorted rows is not allowed. The value is used once the grid is not sorted
anymore or the drops are allowed on sorted rows.
client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java
documentation/advanced/advanced-dragndrop.asciidoc
server/src/main/java/com/vaadin/ui/components/grid/GridDropEvent.java
server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java
server/src/test/java/com/vaadin/tests/components/grid/GridDropTargetTest.java [new file with mode: 0644]
shared/src/main/java/com/vaadin/shared/ui/grid/DropLocation.java
shared/src/main/java/com/vaadin/shared/ui/grid/DropMode.java
shared/src/main/java/com/vaadin/shared/ui/grid/GridDropTargetState.java
uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java