Skip to content

Commit

Permalink
fix: run grid dnd filters on dropmode and draggable change (vaadin#6339)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki authored Jun 3, 2024
1 parent 836f59b commit c352cb9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,26 @@ public void setDropFilter_undroppable_noDropMode() {
assertMessages("", "", "");
}

@Test
public void setDragFilter_setRowsDraggable_filtersApply() {
click("toggle-rows-draggable");

click("set-filters");
click("toggle-rows-draggable");
fireDragStart(0);
assertMessages("", "", "");
}

@Test
public void setDropFilter_setDropMode_filtersApply() {
click("no-drop-mode");

click("set-filters");
click("BETWEEN");
fireDrop(0, "below");
assertMessages("", "", "");
}

@Test
public void removeOnItemClick_noError() {
click("remove-on-item-click");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4532,6 +4532,7 @@ public Registration addDragEndListener(
public void setDropMode(GridDropMode dropMode) {
getElement().setProperty("dropMode",
dropMode == null ? null : dropMode.getClientName());
getDataCommunicator().reset();
}

/**
Expand All @@ -4556,6 +4557,7 @@ public GridDropMode getDropMode() {
*/
public void setRowsDraggable(boolean rowsDraggable) {
getElement().setProperty("rowsDraggable", rowsDraggable);
getDataCommunicator().reset();
}

/**
Expand Down

0 comments on commit c352cb9

Please sign in to comment.