-
Notifications
You must be signed in to change notification settings - Fork 161
igxGrid Collapsible Column Groups
Version | User | Date | Notes |
---|---|---|---|
0.1 | Stefan Ivanov | Feb 21, 2019 | Spec and design initial creation |
1.0 | Zdravko Kolev | Nov 04, 2019 | Overview and API update, Stories and ARIA |
1.1 | Zdravko Kolev | Nov 06, 2019 | Final changes to ARIA and API |
Collapsible multi-column headers make it possible to collapse all nested headers under the current one and layout the body cells of the underlying columns according to a template provided by the developer. A column group usually consists of two or more columns. When a column group is collapsed, a subset of the columns will be shown to the end-user. This subset can be one or more of the previously shown columns or an entirely new set of columns. Each collapsed/expanded column can be bound to the data source of the grid, or it may be unbound, thus calculated.
There are several use cases in which a user will need collapsible column groups.
-
be able to expand and collapse grouped columns through their multicolumn headers to show more relevant or hide less critical information in the grid
-
be able to mark one or more columns per group as visible on collapse action, having the overall column count greatly reduced.
-
be able to define a
header template
when a group column is collapsed as a summary of the combinedheaders
. -
be able to define a
cell template
when a group column is collapsed as a summary of the combinedcells
. -
be able to change the expand/collapse indicator
Expanded State
Collapsing Address multi-column header
- Be able to set a group column as collapsible
- Be able to set the initial state of a group column to
expand
or not. - Have
collapsible capabilities
only if there is one child column withvissibleOnCollapse
set to true. Note: if all child columns are set tovissibleOnCollapse
false, the collapsible indicator won't be shown. - Be able to define a template for the layout that is used when a multi-column header is collapsed
- This template should make it possible to combine different types of data
- This template may additionally modify the data e.g. 12 Jan 2019 -> 1/12/19
- This template may create a template for a single cell or define a layout of cells
- Have the grid header reduce its height automatically as headers are collapsed when the necessary height to render the headers decreases.
Name | Description | Type | Default value |
---|---|---|---|
collapsible | Used to identify that certain Grouped column is collapsible | boolean | false |
expand | Used to set whether the group is expanded or collapsed initially. Applied only if the collapsible property is set to true |
boolean | true |
vissibleOnCollapse |
used to identify whether the column would be visible on collapsed state of the grouped column |
boolean | undefined/true/false |
Name | Description | Cancelable | Event arguments |
---|---|---|---|
expandChange | This event is fired when a group is expanded/collapsed | No | Column (the column object for the current group that is collapsed/expanded) |
WAI-ARIA Support In 2014 the W3C finalized their WAI-ARIA specification which defined how to design Web content and Web applications to be more accessible to users with disabilities. The Grid has been designed so that it follows these guidelines.
The list below provides details about what changes have been made to the Grid Columns to support WAI-ARIA. Please note that no special settings are needed to leverage these changes, as they are all enabled by default.
-
tabindex
attribute allows access to the elements through the use of TAB and SHIFT + TAB keys. Note: Thetabindex
attribute should be rendered on every additional navigational element in the header elements. -
aria-label
thee igxGrid header elements should carry aria-label attributes with the column header text, in order for the header text to be read instead of the title attribute value when a title attribute is present -
columnheader
each igxGrid header element should be decorated with columnheader role.
-
At least one column should be shown when you expand/collapse a group - When you define group rules, a check is made whether you would have at least one column shown when the group is expanded or collapsed
-
Group options’ hidden takes precedence over column hidden - If you declared your column to be hidden using the property hidden and you have a group defined where the same column should be shown, the column will be shown.