Hi Tatu,
on version 2.0.0, setting SortComparator in deprected getDataProvider() will work:
twinColSelect.setItems(“Entry1”, “Entry2”, “Entry3”);((ListDataProvider)twinColSelect.getDataProvider()).setSortComparator((o1,o2) → ((String)o1).compareTo((String)o2));
but not on ListDataView:
twinColSelect.setItems(“Entry1”, “Entry2”, “Entry3”);
twinColSelect.getListDataView().setSortComparator((o1,o2) → ((String)o1).compareTo((String)o2));
Another point is, that the left list is not resorted when double-clicking on an item in the right list to move it to left.
I think, there’s still a
DataProvider<T, ?> dp = TwinColSelect.this.getDataProvider();
if (dp instanceof InMemoryDataProvider) {
InMemoryDataProvider dataProvider = (InMemoryDataProvider) dp;
TwinColSelect.this.sortDestinationList(listRight, dataProvider);
}
missing in the double-click-listener method of the ClickItem-Constructor, as described in an earlier comment.
Is it possible to implement labels for the left and right list ?
or am i allowed to copy your code and modify it ?
Thx Sönke