mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 10:17:43 +08:00
Group Table rows are not selected by selectAll()
method if group is collapsed #1084
This commit is contained in:
parent
bd4d6a33bc
commit
f42896ae61
@ -406,8 +406,10 @@ public class WebGroupTable<E extends Entity> extends WebAbstractTable<CubaGroupT
|
||||
public void selectAll() {
|
||||
if (isMultiSelect()) {
|
||||
if (getTableSource() instanceof GroupTableSource) {
|
||||
List<GroupInfo> roots = ((GroupTableSource<E>) getTableSource()).rootGroups();
|
||||
LinkedList<Object> itemIds = getAllItemIds(roots);
|
||||
GroupTableSource<E> tableSource = (GroupTableSource<E>) getTableSource();
|
||||
Collection<?> itemIds = tableSource.hasGroups()
|
||||
? getAllItemIds(tableSource)
|
||||
: tableSource.getItemIds();
|
||||
component.setValue(itemIds);
|
||||
return;
|
||||
}
|
||||
@ -415,7 +417,8 @@ public class WebGroupTable<E extends Entity> extends WebAbstractTable<CubaGroupT
|
||||
super.selectAll();
|
||||
}
|
||||
|
||||
protected LinkedList<Object> getAllItemIds(List<GroupInfo> roots) {
|
||||
protected LinkedList<Object> getAllItemIds(GroupTableSource<E> tableSource) {
|
||||
List<GroupInfo> roots = tableSource.rootGroups();
|
||||
final LinkedList<Object> result = new LinkedList<>();
|
||||
for (final GroupInfo root : roots) {
|
||||
result.add(root);
|
||||
|
Loading…
Reference in New Issue
Block a user