@patternfly/react-table 4.93.12 → 4.93.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/Table/base/types.d.ts +8 -0
  3. package/dist/esm/components/Table/base/types.d.ts.map +1 -1
  4. package/dist/esm/components/Table/base/types.js.map +1 -1
  5. package/dist/esm/components/Table/utils/decorators/compoundExpand.js +2 -2
  6. package/dist/esm/components/Table/utils/decorators/compoundExpand.js.map +1 -1
  7. package/dist/esm/components/Table/utils/headerUtils.d.ts.map +1 -1
  8. package/dist/esm/components/Table/utils/headerUtils.js +1 -0
  9. package/dist/esm/components/Table/utils/headerUtils.js.map +1 -1
  10. package/dist/esm/components/TableComposable/Td.d.ts.map +1 -1
  11. package/dist/esm/components/TableComposable/Td.js +6 -2
  12. package/dist/esm/components/TableComposable/Td.js.map +1 -1
  13. package/dist/js/components/Table/base/types.d.ts +8 -0
  14. package/dist/js/components/Table/base/types.d.ts.map +1 -1
  15. package/dist/js/components/Table/base/types.js.map +1 -1
  16. package/dist/js/components/Table/utils/decorators/compoundExpand.js +2 -2
  17. package/dist/js/components/Table/utils/decorators/compoundExpand.js.map +1 -1
  18. package/dist/js/components/Table/utils/headerUtils.d.ts.map +1 -1
  19. package/dist/js/components/Table/utils/headerUtils.js +1 -0
  20. package/dist/js/components/Table/utils/headerUtils.js.map +1 -1
  21. package/dist/js/components/TableComposable/Td.d.ts.map +1 -1
  22. package/dist/js/components/TableComposable/Td.js +6 -2
  23. package/dist/js/components/TableComposable/Td.js.map +1 -1
  24. package/dist/umd/react-table.js +11 -8
  25. package/dist/umd/react-table.min.css +178 -178
  26. package/dist/umd/react-table.min.js +5 -5
  27. package/package.json +6 -6
  28. package/src/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +4 -0
  29. package/src/components/Table/base/types.tsx +8 -0
  30. package/src/components/Table/examples/LegacyTableActions.tsx +1 -1
  31. package/src/components/Table/examples/LegacyTableCompoundExpandable.tsx +2 -0
  32. package/src/components/Table/examples/LegacyTableExpandable.tsx +2 -0
  33. package/src/components/Table/examples/LegacyTableSelectableRadio.tsx +1 -1
  34. package/src/components/Table/examples/Table.md +3 -3
  35. package/src/components/Table/utils/decorators/compoundExpand.tsx +2 -2
  36. package/src/components/Table/utils/headerUtils.tsx +1 -0
  37. package/src/components/TableComposable/Td.tsx +6 -2
  38. package/src/components/TableComposable/examples/ComposableTableCompoundExpandable.tsx +22 -6
  39. package/src/components/TableComposable/examples/ComposableTableExpandable.tsx +2 -1
  40. package/src/components/TableComposable/examples/ComposableTableNestedExpandable.tsx +3 -2
  41. package/src/components/TableComposable/examples/ComposableTableNestedTableExpandable.tsx +2 -1
  42. package/src/demos/Table.md +24 -10
  43. package/src/demos/table-demos/CompoundExpansion.jsx +15 -6
  44. package/src/demos/table-demos/ExpandCollapseAll.jsx +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "4.93.12",
3
+ "version": "4.93.15",
4
4
  "description": "This library provides a set of React table components for use with the PatternFly 4",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -31,10 +31,10 @@
31
31
  "clean": "rimraf dist"
32
32
  },
33
33
  "dependencies": {
34
- "@patternfly/react-core": "^4.224.12",
35
- "@patternfly/react-icons": "^4.75.12",
36
- "@patternfly/react-styles": "^4.74.12",
37
- "@patternfly/react-tokens": "^4.76.12",
34
+ "@patternfly/react-core": "^4.224.15",
35
+ "@patternfly/react-icons": "^4.75.15",
36
+ "@patternfly/react-styles": "^4.74.15",
37
+ "@patternfly/react-tokens": "^4.76.15",
38
38
  "lodash": "^4.17.19",
39
39
  "tslib": "^2.0.0"
40
40
  },
@@ -46,5 +46,5 @@
46
46
  "react": "^16.8.0 || ^17.0.0",
47
47
  "react-dom": "^16.8.0 || ^17.0.0"
48
48
  },
49
- "gitHead": "c2616a25c297f5810239191a6414b9d4218bd7e0"
49
+ "gitHead": "8a6128c294563ad73f89f3cef30fa2a14f3efab1"
50
50
  }
@@ -2720,6 +2720,7 @@ exports[`Table Compound Expandable table 1`] = `
2720
2720
  <button
2721
2721
  aria-expanded="true"
2722
2722
  class="pf-c-table__button"
2723
+ id="expandable-toggle-0-0"
2723
2724
  type="button"
2724
2725
  >
2725
2726
  <span
@@ -2737,6 +2738,7 @@ exports[`Table Compound Expandable table 1`] = `
2737
2738
  <button
2738
2739
  aria-expanded="false"
2739
2740
  class="pf-c-table__button"
2741
+ id="expandable-toggle-0-1"
2740
2742
  type="button"
2741
2743
  >
2742
2744
  <span
@@ -2781,6 +2783,7 @@ exports[`Table Compound Expandable table 1`] = `
2781
2783
  <button
2782
2784
  aria-expanded="false"
2783
2785
  class="pf-c-table__button"
2786
+ id="expandable-toggle-2-0"
2784
2787
  type="button"
2785
2788
  >
2786
2789
  <span
@@ -2798,6 +2801,7 @@ exports[`Table Compound Expandable table 1`] = `
2798
2801
  <button
2799
2802
  aria-expanded="false"
2800
2803
  class="pf-c-table__button"
2804
+ id="expandable-toggle-2-1"
2801
2805
  type="button"
2802
2806
  >
2803
2807
  <span
@@ -81,6 +81,8 @@ export interface TdExpandType {
81
81
  columnIndex?: number;
82
82
  /** On toggling the expansion */
83
83
  onToggle?: OnCollapse;
84
+ /** Id prefix for expandable rows **/
85
+ expandId?: string;
84
86
  }
85
87
 
86
88
  export interface TdCompoundExpandType {
@@ -88,6 +90,12 @@ export interface TdCompoundExpandType {
88
90
  isExpanded: boolean;
89
91
  /** Callback on toggling of the expansion */
90
92
  onToggle?: OnExpand;
93
+ /** Id prefix for expandable cells **/
94
+ expandId?: string;
95
+ /** The row index */
96
+ rowIndex?: number;
97
+ /** The column index */
98
+ columnIndex?: number;
91
99
  }
92
100
 
93
101
  export interface TdFavoritesType {
@@ -68,7 +68,7 @@ export const LegacyTableActions: React.FunctionComponent = () => {
68
68
  );
69
69
 
70
70
  const columns: TableProps['cells'] = [
71
- { title: 'Repositories', cellTransforms: [headerCol()] },
71
+ { title: 'Repositories', cellTransforms: [headerCol('actions')] },
72
72
  'Branches',
73
73
  'Pull requests',
74
74
  'Workspaces',
@@ -167,6 +167,8 @@ export const LegacyTableCompoundExpandable: React.FunctionComponent = () => {
167
167
  }}
168
168
  rows={rows}
169
169
  cells={columns}
170
+ expandId="compound-expandable-table-toggle"
171
+ contentId="compound-expandable-table-content"
170
172
  >
171
173
  <TableHeader />
172
174
  <TableBody />
@@ -163,6 +163,8 @@ export const LegacyTableExpandable: React.FunctionComponent = () => {
163
163
  }}
164
164
  rows={rows}
165
165
  cells={columns}
166
+ expandId="expandable-table-toggle"
167
+ contentId="expandable-table-content"
166
168
  >
167
169
  <TableHeader />
168
170
  <TableBody />
@@ -24,7 +24,7 @@ export const LegacyTableSelectableRadio: React.FunctionComponent = () => {
24
24
  const [selectedRepoName, setSelectedRepoName] = React.useState<string | null>(null);
25
25
 
26
26
  const columns: TableProps['cells'] = [
27
- { title: 'Repositories', cellTransforms: [headerCol()] },
27
+ { title: 'Repositories', cellTransforms: [headerCol('selectable-radio')] },
28
28
  'Branches',
29
29
  { title: 'Pull requests' },
30
30
  'Workspaces',
@@ -6,7 +6,7 @@ propComponents: ['Table', 'TableHeader', 'TableBody', 'ISortBy']
6
6
  ouia: true
7
7
  ---
8
8
 
9
- # Table
9
+ # Legacy Table
10
10
 
11
11
  Note: Table lives in its own package at [@patternfly/react-table](https://www.npmjs.com/package/@patternfly/react-table)!
12
12
 
@@ -30,7 +30,7 @@ import SortAmountDownIcon from '@patternfly/react-icons/dist/esm/icons/sort-amou
30
30
  import { css } from '@patternfly/react-styles';
31
31
  import styles from '@patternfly/react-styles/css/components/Table/table';
32
32
 
33
- ### Table Columns
33
+ ## Table Columns
34
34
 
35
35
  Array items for columns provided to the `Table`'s `cells` prop, can be simple strings or objects.
36
36
 
@@ -88,7 +88,7 @@ columns: [
88
88
 
89
89
  Many of the subsequent examples demonstrate how to apply different transformations to enable `Table` features.
90
90
 
91
- ### Table Rows
91
+ ## Table Rows
92
92
 
93
93
  Array items for rows provided to the `Table`'s `rows` prop, can be simple strings or objects.
94
94
 
@@ -13,7 +13,7 @@ export const compoundExpand: ITransform = (
13
13
  }
14
14
  const { title, props } = value;
15
15
  const {
16
- extraParams: { onExpand }
16
+ extraParams: { onExpand, expandId = 'expand-toggle' }
17
17
  } = column;
18
18
  const extraData = {
19
19
  rowIndex,
@@ -21,7 +21,6 @@ export const compoundExpand: ITransform = (
21
21
  column,
22
22
  property
23
23
  };
24
-
25
24
  /**
26
25
  * @param {React.MouseEvent} event - Mouse event
27
26
  */
@@ -38,6 +37,7 @@ export const compoundExpand: ITransform = (
38
37
  onClick={onToggle}
39
38
  aria-expanded={props.isOpen}
40
39
  aria-controls={props.ariaControls}
40
+ id={`${expandId}-${rowIndex}-${columnIndex}`}
41
41
  >
42
42
  <TableText>{title}</TableText>
43
43
  </button>
@@ -168,6 +168,7 @@ const favoritesTransforms = ({
168
168
  transforms:
169
169
  onSort && canSortFavorites
170
170
  ? [
171
+ scopeColTransformer,
171
172
  sortableFavorites({
172
173
  onSort,
173
174
  // favorites should be just before the first user-defined column
@@ -134,7 +134,8 @@ const TdBase: React.FunctionComponent<TdProps> = ({
134
134
  },
135
135
  column: {
136
136
  extraParams: {
137
- onCollapse: expand?.onToggle
137
+ onCollapse: expand?.onToggle,
138
+ expandId: expand?.expandId
138
139
  }
139
140
  }
140
141
  })
@@ -149,9 +150,12 @@ const TdBase: React.FunctionComponent<TdProps> = ({
149
150
  }
150
151
  } as IFormatterValueType,
151
152
  {
153
+ rowIndex: compoundExpandProp?.rowIndex,
154
+ columnIndex: compoundExpandProp?.columnIndex,
152
155
  column: {
153
156
  extraParams: {
154
- onExpand: compoundExpandProp?.onToggle
157
+ onExpand: compoundExpandProp?.onToggle,
158
+ expandId: compoundExpandProp?.expandId
155
159
  }
156
160
  }
157
161
  }
@@ -44,9 +44,17 @@ export const ComposableTableCompoundExpandable: React.FunctionComponent = () =>
44
44
  }
45
45
  setExpandedCells(newExpandedCells);
46
46
  };
47
- const compoundExpandParams = (repo: Repository, columnKey: ColumnKey): TdProps['compoundExpand'] => ({
47
+ const compoundExpandParams = (
48
+ repo: Repository,
49
+ columnKey: ColumnKey,
50
+ rowIndex: number,
51
+ columnIndex: number
52
+ ): TdProps['compoundExpand'] => ({
48
53
  isExpanded: expandedCells[repo.name] === columnKey,
49
- onToggle: () => setCellExpanded(repo, columnKey, expandedCells[repo.name] !== columnKey)
54
+ onToggle: () => setCellExpanded(repo, columnKey, expandedCells[repo.name] !== columnKey),
55
+ expandId: 'composable-compound-expandable-example',
56
+ rowIndex,
57
+ columnIndex
50
58
  });
51
59
 
52
60
  return (
@@ -61,7 +69,7 @@ export const ComposableTableCompoundExpandable: React.FunctionComponent = () =>
61
69
  <Th />
62
70
  </Tr>
63
71
  </Thead>
64
- {repositories.map(repo => {
72
+ {repositories.map((repo: Repository, rowIndex: number) => {
65
73
  const expandedCellKey = expandedCells[repo.name];
66
74
  const isRowExpanded = !!expandedCellKey;
67
75
  return (
@@ -70,16 +78,24 @@ export const ComposableTableCompoundExpandable: React.FunctionComponent = () =>
70
78
  <Td width={25} dataLabel={columnNames.name} component="th">
71
79
  <a href="#">{repo.name}</a>
72
80
  </Td>
73
- <Td width={10} dataLabel={columnNames.branches} compoundExpand={compoundExpandParams(repo, 'branches')}>
81
+ <Td
82
+ width={10}
83
+ dataLabel={columnNames.branches}
84
+ compoundExpand={compoundExpandParams(repo, 'branches', rowIndex, 1)}
85
+ >
74
86
  <CodeBranchIcon key="icon" /> {repo.branches}
75
87
  </Td>
76
- <Td width={10} dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs')}>
88
+ <Td
89
+ width={10}
90
+ dataLabel={columnNames.prs}
91
+ compoundExpand={compoundExpandParams(repo, 'prs', rowIndex, 2)}
92
+ >
77
93
  <CodeIcon key="icon" /> {repo.prs}
78
94
  </Td>
79
95
  <Td
80
96
  width={10}
81
97
  dataLabel={columnNames.workspaces}
82
- compoundExpand={compoundExpandParams(repo, 'workspaces')}
98
+ compoundExpand={compoundExpandParams(repo, 'workspaces', rowIndex, 3)}
83
99
  >
84
100
  <CubeIcon key="icon" /> {repo.workspaces}
85
101
  </Td>
@@ -160,7 +160,8 @@ export const ComposableTableExpandable: React.FunctionComponent = () => {
160
160
  ? {
161
161
  rowIndex,
162
162
  isExpanded: isRepoExpanded(repo),
163
- onToggle: () => setRepoExpanded(repo, !isRepoExpanded(repo))
163
+ onToggle: () => setRepoExpanded(repo, !isRepoExpanded(repo)),
164
+ expandId: 'composable-expandable-example'
164
165
  }
165
166
  : undefined
166
167
  }
@@ -99,7 +99,8 @@ export const ComposableTableNestedExpandable: React.FunctionComponent = () => {
99
99
  expand={{
100
100
  rowIndex,
101
101
  isExpanded: isTeamExpanded(team),
102
- onToggle: () => setTeamExpanded(team, !isTeamExpanded(team))
102
+ onToggle: () => setTeamExpanded(team, !isTeamExpanded(team)),
103
+ expandId: 'composable-nested-expandable-example'
103
104
  }}
104
105
  />
105
106
  <Td dataLabel={columnNames.team}>{team.name}</Td>
@@ -108,7 +109,7 @@ export const ComposableTableNestedExpandable: React.FunctionComponent = () => {
108
109
  <Td dataLabel={columnNames.visual}>{team.members.visual}</Td>
109
110
  <Td dataLabel={columnNames.contact}>
110
111
  <Button variant="link" component="a" href={`mailto:${team.email}`} isInline>
111
- Message us!
112
+ Email team {rowIndex}
112
113
  </Button>
113
114
  </Td>
114
115
  </Tr>
@@ -158,7 +158,8 @@ export const ComposableTableExpandable: React.FunctionComponent = () => {
158
158
  ? {
159
159
  rowIndex,
160
160
  isExpanded: isRepoExpanded(repo),
161
- onToggle: () => setRepoExpanded(repo, !isRepoExpanded(repo))
161
+ onToggle: () => setRepoExpanded(repo, !isRepoExpanded(repo)),
162
+ expandId: 'composable-nested-table-expandable-example'
162
163
  }
163
164
  : undefined
164
165
  }
@@ -27,6 +27,8 @@ import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
27
27
  import AttentionBellIcon from '@patternfly/react-icons/dist/esm/icons/attention-bell-icon';
28
28
  import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
29
29
 
30
+ ## Demos
31
+
30
32
  ### Bulk select
31
33
 
32
34
  ```js isFullscreen
@@ -886,10 +888,13 @@ class ColumnManagementAction extends React.Component {
886
888
  <ToolbarItem variant="pagination">
887
889
  <Pagination
888
890
  itemCount={37}
889
- widgetId="pagination-options-menu-bottom"
891
+ widgetId="pagination-options-menu"
890
892
  page={1}
891
893
  variant={PaginationVariant.top}
892
894
  isCompact
895
+ titles={{
896
+ paginationTitle: `Column management top pagination`
897
+ }}
893
898
  />
894
899
  </ToolbarItem>
895
900
  </ToolbarContent>
@@ -923,6 +928,9 @@ class ColumnManagementAction extends React.Component {
923
928
  widgetId="pagination-options-menu-bottom"
924
929
  page={1}
925
930
  variant={PaginationVariant.bottom}
931
+ titles={{
932
+ paginationTitle: `Column management bottom pagination`
933
+ }}
926
934
  />
927
935
  {this.renderModal()}
928
936
  </React.Fragment>
@@ -1601,7 +1609,7 @@ class ColumnManagementAction extends React.Component {
1601
1609
 
1602
1610
  const toolbarItems = (
1603
1611
  <React.Fragment>
1604
- <span id="page-layout-table-column-management-action-toolbar-top-select-checkbox-label" hidden>
1612
+ <span id="page-layout-table-draggable-column-management-action-toolbar-top-select-checkbox-label" hidden>
1605
1613
  Choose one
1606
1614
  </span>
1607
1615
  <ToolbarContent>
@@ -1609,10 +1617,10 @@ class ColumnManagementAction extends React.Component {
1609
1617
  <OverflowMenu breakpoint="md">
1610
1618
  <OverflowMenuItem isPersistent>
1611
1619
  <Select
1612
- id="page-layout-table-column-management-action-toolbar-top-select-checkbox-toggle"
1620
+ id="page-layout-table-draggable-column-management-action-toolbar-top-select-checkbox-toggle"
1613
1621
  variant={SelectVariant.single}
1614
1622
  aria-label="Select Input"
1615
- aria-labelledby="page-layout-table-column-management-action-toolbar-top-select-checkbox-label page-layout-table-column-management-action-toolbar-top-select-checkbox-toggle"
1623
+ aria-labelledby="page-layout-table-draggable-column-management-action-toolbar-top-select-checkbox-label page-layout-table-column-management-action-toolbar-top-select-checkbox-toggle"
1616
1624
  placeholderText={
1617
1625
  <>
1618
1626
  <FilterIcon /> Name
@@ -1622,7 +1630,7 @@ class ColumnManagementAction extends React.Component {
1622
1630
  </OverflowMenuItem>
1623
1631
  <OverflowMenuItem>
1624
1632
  <OptionsMenu
1625
- id="page-layout-table-column-management-action-toolbar-top-options-menu-toggle"
1633
+ id="page-layout-table-draggable-column-management-action-toolbar-top-options-menu-toggle"
1626
1634
  isPlain
1627
1635
  menuItems={[]}
1628
1636
  toggle={
@@ -1649,10 +1657,13 @@ class ColumnManagementAction extends React.Component {
1649
1657
  <ToolbarItem variant="pagination">
1650
1658
  <Pagination
1651
1659
  itemCount={37}
1652
- widgetId="pagination-options-menu-bottom"
1660
+ widgetId="pagination-options-menu"
1653
1661
  page={1}
1654
1662
  variant={PaginationVariant.top}
1655
1663
  isCompact
1664
+ titles={{
1665
+ paginationTitle: `Draggable column management top pagination`
1666
+ }}
1656
1667
  />
1657
1668
  </ToolbarItem>
1658
1669
  </ToolbarContent>
@@ -1665,11 +1676,11 @@ class ColumnManagementAction extends React.Component {
1665
1676
  gridBreakPoint="grid-xl"
1666
1677
  header={
1667
1678
  <React.Fragment>
1668
- <Toolbar id="page-layout-table-column-management-action-toolbar-top">{toolbarItems}</Toolbar>
1679
+ <Toolbar id="page-layout-table-draggable-column-management-action-toolbar-top">{toolbarItems}</Toolbar>
1669
1680
  </React.Fragment>
1670
1681
  }
1671
1682
  aria-label="This is a table with checkboxes"
1672
- id="page-layout-table-column-management-action-table"
1683
+ id="page-layout-table-draggable-column-management-action-table"
1673
1684
  onSelect={this.onSelect}
1674
1685
  cells={columns}
1675
1686
  rows={rows}
@@ -1681,11 +1692,14 @@ class ColumnManagementAction extends React.Component {
1681
1692
  </Table>
1682
1693
  <Pagination
1683
1694
  isCompact
1684
- id="page-layout-table-column-management-action-toolbar-bottom"
1695
+ id="page-layout-table-draggable-column-management-action-toolbar-bottom"
1685
1696
  itemCount={37}
1686
1697
  widgetId="pagination-options-menu-bottom"
1687
1698
  page={1}
1688
1699
  variant={PaginationVariant.bottom}
1700
+ titles={{
1701
+ paginationTitle: `Draggable column management bottom pagination`
1702
+ }}
1689
1703
  />
1690
1704
  {this.renderModal()}
1691
1705
  </React.Fragment>
@@ -2641,7 +2655,7 @@ class ComplexPaginationTableDemo extends React.Component {
2641
2655
  onPerPageSelect={(_evt, value) => this.fetch(1, value)}
2642
2656
  variant={variant}
2643
2657
  titles={{
2644
- paginationTitle: `${variant} pagination`
2658
+ paginationTitle: `Pagination demo ${variant} pagination`
2645
2659
  }}
2646
2660
  />
2647
2661
  );
@@ -171,9 +171,12 @@ export const CompoundExpandable = () => {
171
171
  }
172
172
  setExpandedCells(newExpandedCells);
173
173
  };
174
- const compoundExpandParams = (repo, columnKey) => ({
174
+ const compoundExpandParams = (repo, columnKey, rowIndex, columnIndex) => ({
175
175
  isExpanded: expandedCells[repo.name] === columnKey,
176
- onToggle: () => setCellExpanded(repo, columnKey, expandedCells[repo.name] !== columnKey)
176
+ onToggle: () => setCellExpanded(repo, columnKey, expandedCells[repo.name] !== columnKey),
177
+ expandId: 'compound-expandable-demo',
178
+ rowIndex,
179
+ columnIndex
177
180
  });
178
181
 
179
182
  return (
@@ -192,7 +195,7 @@ export const CompoundExpandable = () => {
192
195
  <Th />
193
196
  </Tr>
194
197
  </Thead>
195
- {repositories.map(repo => {
198
+ {repositories.map((repo, rowIndex) => {
196
199
  const expandedCellKey = expandedCells[repo.name];
197
200
  const isRowExpanded = !!expandedCellKey;
198
201
  return (
@@ -201,7 +204,10 @@ export const CompoundExpandable = () => {
201
204
  <Td dataLabel={columnNames.name} component="th">
202
205
  <a href="#">{repo.name}</a>
203
206
  </Td>
204
- <Td dataLabel={columnNames.branches} compoundExpand={compoundExpandParams(repo, 'branches')}>
207
+ <Td
208
+ dataLabel={columnNames.branches}
209
+ compoundExpand={compoundExpandParams(repo, 'branches', rowIndex, 1)}
210
+ >
205
211
  <Flex spaceItems={{ default: 'spaceItemsSm' }}>
206
212
  <FlexItem>
207
213
  <CodeBranchIcon key="icon" />
@@ -209,7 +215,7 @@ export const CompoundExpandable = () => {
209
215
  <FlexItem>{repo.branches}</FlexItem>
210
216
  </Flex>
211
217
  </Td>
212
- <Td dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs')}>
218
+ <Td dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs', rowIndex, 2)}>
213
219
  <Flex spaceItems={{ default: 'spaceItemsSm' }}>
214
220
  <FlexItem>
215
221
  <CodeIcon key="icon" />
@@ -217,7 +223,10 @@ export const CompoundExpandable = () => {
217
223
  <FlexItem>{repo.prs}</FlexItem>
218
224
  </Flex>{' '}
219
225
  </Td>
220
- <Td dataLabel={columnNames.workspaces} compoundExpand={compoundExpandParams(repo, 'workspaces')}>
226
+ <Td
227
+ dataLabel={columnNames.workspaces}
228
+ compoundExpand={compoundExpandParams(repo, 'workspaces', rowIndex, 3)}
229
+ >
221
230
  <Flex spaceItems={{ default: 'spaceItemsSm' }}>
222
231
  <FlexItem>
223
232
  <CubeIcon key="icon" />
@@ -138,6 +138,7 @@ class ExpandCollapseAllTableDemo extends React.Component {
138
138
  canSelectAll={false}
139
139
  canCollapseAll={true}
140
140
  collapseAllAriaLabel={collapseAllAriaLabel}
141
+ expandId="expand-collapse-all-demo"
141
142
  >
142
143
  <TableHeader />
143
144
  <TableBody />