You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// common grid with public setSelectionModel methodCustomGridg = newCustomGrid();
g.setItems("text1", "text2");
g.addColumn(c -> c).setSortable(true);
TableSelectionModel<String> model = newTableSelectionModel<>();
model.setMode(TableSelectionState.TableSelectionMode.SHIFT);
model.setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility.HIDDEN);
g.setSelectionModel(model);
Crashes when selecting an item, because MultiSelectionModelImpl#verifyUserCanSelectAll throws an IllegalStateException on selectAll/deselectAll from client.
Using SelectAllCheckBoxVisibility.VISIBLE does not work properly with Vaadin 8.5.1, because TableSelectionModelConnector#initSelectionModel creates a common MultiSelectionModel and overwrites it with a CustomSelectionModel.
The problem is, that com.vaadin.client.widgets.Grid#setSelectColumnRenderer initially creates a HeaderClickHandler.
If you click on the first column for sorting, all items are selected.
Fix is quite simple:
do not overwrite initSelectionModel() in TableSelectionModelConnector. Overwrite createSelectionModel()
The text was updated successfully, but these errors were encountered:
alexandru78
added a commit
to antea/GridExtensionPack
that referenced
this issue
Aug 8, 2019
Crashes when selecting an item, because MultiSelectionModelImpl#verifyUserCanSelectAll throws an IllegalStateException on selectAll/deselectAll from client.
Using SelectAllCheckBoxVisibility.VISIBLE does not work properly with Vaadin 8.5.1, because TableSelectionModelConnector#initSelectionModel creates a common MultiSelectionModel and overwrites it with a CustomSelectionModel.
The problem is, that com.vaadin.client.widgets.Grid#setSelectColumnRenderer initially creates a HeaderClickHandler.
If you click on the first column for sorting, all items are selected.
Fix is quite simple:
do not overwrite initSelectionModel() in TableSelectionModelConnector. Overwrite createSelectionModel()
The text was updated successfully, but these errors were encountered: