Interface GroupListDataComponent<E>
- Type Parameters:
E- item type
- All Superinterfaces:
ListDataComponent<E>
- All Known Implementing Classes:
AbstractGroupDataGridAdapter,GroupDataGrid,GroupDataGridAdapter
A component that provides grouping functionality for a list of items.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent fired when a group collapsed.static classEvent fired when a group expanded. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationAdds a listener to be notified when a group is collapsed.com.vaadin.flow.shared.RegistrationaddExpandListener(Consumer<GroupListDataComponent.ExpandEvent<E>> listener) Adds a listener to be notified when a group is expanded.voidCollapses the specified group.voidCollapses all root groups and their children recursively.voidcollapseByPath(E item) Collapses all groups that are on the path to the provided item.voidExpands the specified group.voidExpands all root groups and their children recursively.voidexpandByPath(E item) Expands all groups that are on the path to the provided item.getChildren(GroupInfo group) voidgroupByKeys(String... keys) Groups data by the specified column keys.voidgroupByKeysList(List<String> keys) Groups data by the specified column keys.booleanhasChildren(GroupInfo groupInfo) Indicates that the group has nested groupsbooleanIndicates that items have groupsbooleanisExpanded(GroupInfo group) Determines if the specified group is expanded.voidungroup()Resets any grouping applied in the grid.voidungroupByKeys(String... keys) Ungroups the provided array of column keys.voidungroupByKeysList(List<String> keys) Ungroups the provided list of column keys.Methods inherited from interface io.jmix.flowui.component.ListDataComponent
deselect, deselectAll, getItems, getSelectedItems, getSingleSelectedItem, isMultiSelect, select, select
-
Method Details
-
groupByKeys
Groups data by the specified column keys.The previous grouping will be replaced by a new one.
- Parameters:
keys- the column keys to group by
-
groupByKeysList
Groups data by the specified column keys.The previous grouping will be replaced by a new one.
- Parameters:
keys- the column keys to group by
-
ungroup
void ungroup()Resets any grouping applied in the grid. -
ungroupByKeys
Ungroups the provided array of column keys.Grouping columns that are not in the provided keys array will still be applied.
- Parameters:
keys- the array of column keys used to ungroup
-
ungroupByKeysList
Ungroups the provided list of column keys.Grouping columns that are not in the provided keys list will still be applied.
- Parameters:
keys- a list of column keys used to ungroup;
-
expand
Expands the specified group.- Parameters:
group- the group to be expanded
-
expandByPath
Expands all groups that are on the path to the provided item.- Parameters:
item- item to expand all groups
-
expandAll
void expandAll()Expands all root groups and their children recursively. -
collapse
Collapses the specified group.- Parameters:
group- the group to be collapsed
-
collapseByPath
Collapses all groups that are on the path to the provided item.- Parameters:
item- item to collapse all groups
-
collapseAll
void collapseAll()Collapses all root groups and their children recursively. -
isExpanded
Determines if the specified group is expanded.- Parameters:
group- the group to check- Returns:
trueif the group is expanded, false otherwise
-
getRootGroups
- Returns:
- the list of root groups
-
getChildren
- Returns:
- the list of nested groups
-
hasChildren
Indicates that the group has nested groups- Parameters:
groupInfo- group info
-
hasGroups
boolean hasGroups()Indicates that items have groups -
addCollapseListener
com.vaadin.flow.shared.Registration addCollapseListener(Consumer<GroupListDataComponent.CollapseEvent<E>> listener) Adds a listener to be notified when a group is collapsed.- Parameters:
listener- the listener to add- Returns:
- a registration object for removing the listener
-
addExpandListener
com.vaadin.flow.shared.Registration addExpandListener(Consumer<GroupListDataComponent.ExpandEvent<E>> listener) Adds a listener to be notified when a group is expanded.- Parameters:
listener- the listener to add- Returns:
- a registration object for removing the listener
-