@patternfly/react-table 6.3.0-prerelease.9 → 6.3.1-prerelease.0

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 (82) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/Table/package.json +1 -1
  5. package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
  6. package/dist/dynamic/components/Table/utils/package.json +1 -1
  7. package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
  8. package/dist/dynamic/deprecated/components/Table/package.json +1 -1
  9. package/dist/dynamic/deprecated/components/package.json +1 -1
  10. package/dist/esm/components/Table/ExpandableRowContent.d.ts +5 -0
  11. package/dist/esm/components/Table/ExpandableRowContent.d.ts.map +1 -1
  12. package/dist/esm/components/Table/ExpandableRowContent.js +2 -2
  13. package/dist/esm/components/Table/ExpandableRowContent.js.map +1 -1
  14. package/dist/esm/components/Table/Table.d.ts +6 -1
  15. package/dist/esm/components/Table/Table.d.ts.map +1 -1
  16. package/dist/esm/components/Table/Table.js +5 -4
  17. package/dist/esm/components/Table/Table.js.map +1 -1
  18. package/dist/esm/components/Table/Td.d.ts +2 -0
  19. package/dist/esm/components/Table/Td.d.ts.map +1 -1
  20. package/dist/esm/components/Table/Td.js +25 -4
  21. package/dist/esm/components/Table/Td.js.map +1 -1
  22. package/dist/esm/components/Table/Tr.d.ts +5 -1
  23. package/dist/esm/components/Table/Tr.d.ts.map +1 -1
  24. package/dist/esm/components/Table/Tr.js +3 -3
  25. package/dist/esm/components/Table/Tr.js.map +1 -1
  26. package/dist/esm/demos/DashboardHeader.d.ts.map +1 -1
  27. package/dist/esm/demos/DashboardHeader.js +1 -2
  28. package/dist/esm/demos/DashboardHeader.js.map +1 -1
  29. package/dist/esm/demos/sampleData.d.ts.map +1 -1
  30. package/dist/esm/demos/sampleData.js +359 -360
  31. package/dist/esm/demos/sampleData.js.map +1 -1
  32. package/dist/js/components/Table/ExpandableRowContent.d.ts +5 -0
  33. package/dist/js/components/Table/ExpandableRowContent.d.ts.map +1 -1
  34. package/dist/js/components/Table/ExpandableRowContent.js +2 -2
  35. package/dist/js/components/Table/ExpandableRowContent.js.map +1 -1
  36. package/dist/js/components/Table/Table.d.ts +6 -1
  37. package/dist/js/components/Table/Table.d.ts.map +1 -1
  38. package/dist/js/components/Table/Table.js +5 -4
  39. package/dist/js/components/Table/Table.js.map +1 -1
  40. package/dist/js/components/Table/Td.d.ts +2 -0
  41. package/dist/js/components/Table/Td.d.ts.map +1 -1
  42. package/dist/js/components/Table/Td.js +24 -3
  43. package/dist/js/components/Table/Td.js.map +1 -1
  44. package/dist/js/components/Table/Tr.d.ts +5 -1
  45. package/dist/js/components/Table/Tr.d.ts.map +1 -1
  46. package/dist/js/components/Table/Tr.js +3 -3
  47. package/dist/js/components/Table/Tr.js.map +1 -1
  48. package/dist/js/demos/DashboardHeader.d.ts.map +1 -1
  49. package/dist/js/demos/DashboardHeader.js +1 -2
  50. package/dist/js/demos/DashboardHeader.js.map +1 -1
  51. package/dist/js/demos/sampleData.d.ts.map +1 -1
  52. package/dist/js/demos/sampleData.js +359 -360
  53. package/dist/js/demos/sampleData.js.map +1 -1
  54. package/dist/umd/assets/{output-PMQiOdP-.css → output-CKjCu3-7.css} +3852 -3434
  55. package/dist/umd/react-table.min.js +2 -2
  56. package/package.json +6 -6
  57. package/src/components/Table/ExpandableRowContent.tsx +7 -1
  58. package/src/components/Table/Table.tsx +12 -4
  59. package/src/components/Table/Td.tsx +41 -2
  60. package/src/components/Table/Tr.tsx +9 -3
  61. package/src/components/Table/__tests__/ExpandableRowContent.test.tsx +39 -0
  62. package/src/components/Table/__tests__/Table.test.tsx +62 -0
  63. package/src/components/Table/__tests__/Td.test.tsx +87 -0
  64. package/src/components/Table/__tests__/Tr.test.tsx +79 -0
  65. package/src/components/Table/__tests__/__snapshots__/ExpandableRowContent.test.tsx.snap +11 -0
  66. package/src/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +13 -0
  67. package/src/components/Table/__tests__/__snapshots__/Td.test.tsx.snap +33 -0
  68. package/src/components/Table/__tests__/__snapshots__/Tr.test.tsx.snap +35 -0
  69. package/src/components/Table/examples/Table.md +12 -6
  70. package/src/components/Table/examples/TableActions.tsx +1 -1
  71. package/src/components/Table/examples/TableCompoundExpandable.tsx +23 -21
  72. package/src/components/Table/examples/TableExpandable.tsx +7 -2
  73. package/src/components/Table/examples/TableMisc.tsx +0 -1
  74. package/src/components/Table/examples/TableNestedExpandable.tsx +2 -2
  75. package/src/components/Table/examples/TableNestedTableExpandable.tsx +2 -2
  76. package/src/components/Table/examples/TableStripedExpandable.tsx +8 -2
  77. package/src/demos/DashboardHeader.tsx +2 -5
  78. package/src/demos/examples/TableCompoundExpansion.tsx +87 -84
  79. package/src/demos/examples/TableExpandCollapseAll.tsx +2 -2
  80. package/src/demos/examples/TableSortableResponsive.tsx +5 -5
  81. package/src/demos/sampleData.tsx +359 -361
  82. package/src/deprecated/components/Table/examples/LegacyTableMisc.tsx +0 -1
@@ -4,7 +4,6 @@ import { Table, Thead, Tr, Th, Tbody, Td, TdProps, ExpandableRowContent } from '
4
4
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
5
5
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
6
6
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
7
- import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
8
7
 
9
8
  interface Repository {
10
9
  name: string;
@@ -59,7 +58,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
59
58
  });
60
59
 
61
60
  return (
62
- <Table aria-label="Compound expandable table">
61
+ <Table aria-label="Compound expandable table" isExpandable hasAnimations>
63
62
  <Thead>
64
63
  <Tr>
65
64
  <Th>{columnNames.name}</Th>
@@ -75,7 +74,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
75
74
  const isRowExpanded = !!expandedCellKey;
76
75
  return (
77
76
  <Tbody key={repo.name} isExpanded={isRowExpanded}>
78
- <Tr isControlRow>
77
+ <Tr isContentExpanded={isRowExpanded} isControlRow>
79
78
  <Td width={25} dataLabel={columnNames.name} component="th">
80
79
  <a href="#">{repo.name}</a>
81
80
  </Td>
@@ -107,24 +106,27 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
107
106
  <a href="#">Open in GitHub</a>
108
107
  </Td>
109
108
  </Tr>
110
- {isRowExpanded ? (
111
- <Tr isExpanded={isRowExpanded}>
112
- <Td dataLabel={columnNames[expandedCellKey]} colSpan={6}>
113
- <ExpandableRowContent>
114
- <div className={spacing.mMd}>
115
- Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
116
- ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
117
- sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit
118
- dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor.
119
- Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
120
- ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
121
- sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit
122
- dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor.
123
- </div>
124
- </ExpandableRowContent>
125
- </Td>
126
- </Tr>
127
- ) : null}
109
+ <Tr isExpanded={columnNames[expandedCellKey] === columnNames.branches}>
110
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={6}>
111
+ <ExpandableRowContent>
112
+ <div>Expanded content for {repo.name}: branches goes here!</div>
113
+ </ExpandableRowContent>
114
+ </Td>
115
+ </Tr>
116
+ <Tr isExpanded={columnNames[expandedCellKey] === columnNames.prs}>
117
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={6}>
118
+ <ExpandableRowContent>
119
+ <div>Expanded content for {repo.name}: prs goes here!</div>
120
+ </ExpandableRowContent>
121
+ </Td>
122
+ </Tr>
123
+ <Tr isExpanded={columnNames[expandedCellKey] === columnNames.workspaces}>
124
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={6}>
125
+ <ExpandableRowContent>
126
+ <div>Expanded content for {repo.name}: workspaces goes here!</div>
127
+ </ExpandableRowContent>
128
+ </Td>
129
+ </Tr>
128
130
  </Tbody>
129
131
  );
130
132
  })}
@@ -116,7 +116,12 @@ export const TableExpandable: React.FunctionComponent = () => {
116
116
  id="toggle-compact"
117
117
  name="toggle-compact"
118
118
  />
119
- <Table aria-label="Expandable table" variant={isExampleCompact ? 'compact' : undefined}>
119
+ <Table
120
+ isExpandable
121
+ hasAnimations
122
+ aria-label="Expandable table"
123
+ variant={isExampleCompact ? 'compact' : undefined}
124
+ >
120
125
  <Thead>
121
126
  <Tr>
122
127
  <Th screenReaderText="Row expansion" />
@@ -152,7 +157,7 @@ export const TableExpandable: React.FunctionComponent = () => {
152
157
  }
153
158
  return (
154
159
  <Tbody key={repo.name} isExpanded={isRepoExpanded(repo)}>
155
- <Tr>
160
+ <Tr isContentExpanded={isRepoExpanded(repo)}>
156
161
  <Td
157
162
  expand={
158
163
  repo.details
@@ -1,5 +1,4 @@
1
1
  import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
2
- /* eslint-disable camelcase */
3
2
  import t_global_background_color_secondary_default from '@patternfly/react-tokens/dist/esm/t_global_background_color_secondary_default';
4
3
 
5
4
  interface Repository {
@@ -61,7 +61,7 @@ export const TableNestedExpandable: React.FunctionComponent = () => {
61
61
 
62
62
  return (
63
63
  <InnerScrollContainer>
64
- <Table aria-label="Nested column headers with expandable rows table" gridBreakPoint="">
64
+ <Table isExpandable hasAnimations aria-label="Nested column headers with expandable rows table" gridBreakPoint="">
65
65
  <Thead hasNestedHeader>
66
66
  <Tr>
67
67
  <Th screenReaderText="Row expansion" rowSpan={2} />
@@ -85,7 +85,7 @@ export const TableNestedExpandable: React.FunctionComponent = () => {
85
85
  </Thead>
86
86
  {teams.map((team, rowIndex) => (
87
87
  <Tbody key={team.name} isExpanded={isTeamExpanded(team)}>
88
- <Tr>
88
+ <Tr isContentExpanded={isTeamExpanded(team)}>
89
89
  <Td
90
90
  expand={{
91
91
  rowIndex,
@@ -128,7 +128,7 @@ export const TableExpandable: React.FunctionComponent = () => {
128
128
  ];
129
129
 
130
130
  return (
131
- <Table aria-label="Simple table">
131
+ <Table isExpandable hasAnimations aria-label="Simple table">
132
132
  <Thead>
133
133
  <Tr>
134
134
  <Th screenReaderText="Row expansion" />
@@ -141,7 +141,7 @@ export const TableExpandable: React.FunctionComponent = () => {
141
141
  </Thead>
142
142
  {repositories.map((repo, rowIndex) => (
143
143
  <Tbody key={repo.name} isExpanded={isRepoExpanded(repo)}>
144
- <Tr>
144
+ <Tr isContentExpanded={isRepoExpanded(repo)}>
145
145
  <Td
146
146
  expand={
147
147
  repo.nestedComponent
@@ -112,7 +112,13 @@ export const TableStripedExpandable: React.FunctionComponent = () => {
112
112
  id="toggle-compact-striped"
113
113
  name="toggle-compact-striped"
114
114
  />
115
- <Table aria-label="Expandable table" variant={isExampleCompact ? 'compact' : undefined} isStriped isExpandable>
115
+ <Table
116
+ aria-label="Expandable table"
117
+ variant={isExampleCompact ? 'compact' : undefined}
118
+ isStriped
119
+ isExpandable
120
+ hasAnimations
121
+ >
116
122
  <Thead>
117
123
  <Tr>
118
124
  <Th screenReaderText="Row expansion" />
@@ -148,7 +154,7 @@ export const TableStripedExpandable: React.FunctionComponent = () => {
148
154
  }
149
155
  return (
150
156
  <Tbody key={repo.name} isExpanded={isRepoExpanded(repo)}>
151
- <Tr>
157
+ <Tr isContentExpanded={isRepoExpanded(repo)}>
152
158
  <Td
153
159
  expand={
154
160
  repo.details
@@ -23,7 +23,6 @@ import {
23
23
  ToolbarItem,
24
24
  PageToggleButton
25
25
  } from '@patternfly/react-core';
26
- import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
27
26
  import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
28
27
  import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
29
28
  import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
@@ -132,9 +131,7 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
132
131
  <Masthead>
133
132
  <MastheadMain>
134
133
  <MastheadToggle>
135
- <PageToggleButton variant="plain" aria-label="Global navigation">
136
- <BarsIcon />
137
- </PageToggleButton>
134
+ <PageToggleButton isHamburgerButton aria-label="Global navigation" />
138
135
  </MastheadToggle>
139
136
  <MastheadBrand>
140
137
  <MastheadLogo>{patternflyLogo}</MastheadLogo>
@@ -159,7 +156,7 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
159
156
  )}
160
157
  <ToolbarGroup variant="action-group-plain" visibility={{ default: 'hidden', lg: 'visible' }}>
161
158
  <ToolbarItem>
162
- <Button aria-label="Settings" variant={ButtonVariant.plain} icon={<CogIcon />} />
159
+ <Button aria-label="Settings" isSettings variant="plain" />
163
160
  </ToolbarItem>
164
161
  <ToolbarItem>
165
162
  <Button aria-label="Help" variant={ButtonVariant.plain} icon={<QuestionCircleIcon />} />
@@ -2,7 +2,6 @@ import { useState } from 'react';
2
2
  import { ActionsColumn, Table, Thead, Tr, Th, Tbody, Td, ExpandableRowContent } from '@patternfly/react-table';
3
3
  import {
4
4
  Button,
5
- Card,
6
5
  Flex,
7
6
  FlexItem,
8
7
  MenuToggle,
@@ -22,7 +21,6 @@ import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
22
21
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
23
22
  import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
24
23
  import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
25
- import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
26
24
 
27
25
  export const TableCompoundExpansion: React.FunctionComponent = () => {
28
26
  // In real usage, this data would come from some external source like an API via props.
@@ -200,88 +198,93 @@ export const TableCompoundExpansion: React.FunctionComponent = () => {
200
198
  return (
201
199
  <DashboardWrapper hasPageTemplateTitle>
202
200
  <PageSection padding={{ default: 'noPadding', xl: 'padding' }} aria-label="Compound expandable table data ">
203
- <Card>
204
- {tableToolbar}
205
- <Table aria-label="Compound expandable table">
206
- <Thead>
207
- <Tr>
208
- <Th>{columnNames.name}</Th>
209
- <Th>{columnNames.branches}</Th>
210
- <Th>{columnNames.prs}</Th>
211
- <Th>{columnNames.workspaces}</Th>
212
- <Th>{columnNames.lastCommit}</Th>
213
- <Th screenReaderText="URL" />
214
- <Th screenReaderText="Actions" />
215
- </Tr>
216
- </Thead>
217
- {repositories.map((repo, rowIndex) => {
218
- const expandedCellKey = expandedCells[repo.name];
219
- const isRowExpanded = !!expandedCellKey;
220
- return (
221
- <Tbody key={repo.name} isExpanded={isRowExpanded}>
222
- <Tr>
223
- <Td dataLabel={columnNames.name} component="th">
224
- <a href="#">{repo.name}</a>
225
- </Td>
226
- <Td
227
- dataLabel={columnNames.branches}
228
- compoundExpand={compoundExpandParams(repo, 'branches', rowIndex, 1)}
229
- >
230
- <Flex spaceItems={{ default: 'spaceItemsSm' }}>
231
- <FlexItem>
232
- <CodeBranchIcon key="icon" />
233
- </FlexItem>
234
- <FlexItem>{repo.branches}</FlexItem>
235
- </Flex>
236
- </Td>
237
- <Td dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs', rowIndex, 2)}>
238
- <Flex spaceItems={{ default: 'spaceItemsSm' }}>
239
- <FlexItem>
240
- <CodeIcon key="icon" />
241
- </FlexItem>
242
- <FlexItem>{repo.prs}</FlexItem>
243
- </Flex>{' '}
244
- </Td>
245
- <Td
246
- dataLabel={columnNames.workspaces}
247
- compoundExpand={compoundExpandParams(repo, 'workspaces', rowIndex, 3)}
248
- >
249
- <Flex spaceItems={{ default: 'spaceItemsSm' }}>
250
- <FlexItem>
251
- <CubeIcon key="icon" />
252
- </FlexItem>
253
- <FlexItem>{repo.workspaces}</FlexItem>
254
- </Flex>
255
- </Td>
256
- <Td dataLabel={columnNames.lastCommit}>{repo.lastCommit}</Td>
257
- <Td>
258
- <a href="#">Open in GitHub</a>
259
- </Td>
260
- <Td isActionCell>
261
- <ActionsColumn items={defaultActions()} />
262
- </Td>
263
- </Tr>
264
- {isRowExpanded ? (
265
- <Tr isExpanded={isRowExpanded}>
266
- <Td dataLabel={columnNames[expandedCellKey]} noPadding colSpan={7}>
267
- {expandedCellKey === 'branches' && repo.name === 'siemur/test-space' ? (
268
- <NestedItemsTable />
269
- ) : (
270
- <ExpandableRowContent>
271
- <div className={spacing.mMd}>
272
- Expanded content for {repo.name}: {expandedCellKey} goes here!
273
- </div>
274
- </ExpandableRowContent>
275
- )}
276
- </Td>
277
- </Tr>
278
- ) : null}
279
- </Tbody>
280
- );
281
- })}
282
- </Table>
283
- {renderPagination('bottom', false)}
284
- </Card>
201
+ {tableToolbar}
202
+ <Table isExpandable hasAnimations aria-label="Compound expandable table">
203
+ <Thead>
204
+ <Tr>
205
+ <Th>{columnNames.name}</Th>
206
+ <Th>{columnNames.branches}</Th>
207
+ <Th>{columnNames.prs}</Th>
208
+ <Th>{columnNames.workspaces}</Th>
209
+ <Th>{columnNames.lastCommit}</Th>
210
+ <Th screenReaderText="URL" />
211
+ <Th screenReaderText="Actions" />
212
+ </Tr>
213
+ </Thead>
214
+ {repositories.map((repo, rowIndex) => {
215
+ const expandedCellKey = expandedCells[repo.name];
216
+ const isRowExpanded = !!expandedCellKey;
217
+ return (
218
+ <Tbody key={repo.name} isExpanded={isRowExpanded}>
219
+ <Tr isContentExpanded={isRowExpanded} isControlRow>
220
+ <Td dataLabel={columnNames.name} component="th">
221
+ <a href="#">{repo.name}</a>
222
+ </Td>
223
+ <Td
224
+ dataLabel={columnNames.branches}
225
+ compoundExpand={compoundExpandParams(repo, 'branches', rowIndex, 1)}
226
+ >
227
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
228
+ <FlexItem>
229
+ <CodeBranchIcon key="icon" />
230
+ </FlexItem>
231
+ <FlexItem>{repo.branches}</FlexItem>
232
+ </Flex>
233
+ </Td>
234
+ <Td dataLabel={columnNames.prs} compoundExpand={compoundExpandParams(repo, 'prs', rowIndex, 2)}>
235
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
236
+ <FlexItem>
237
+ <CodeIcon key="icon" />
238
+ </FlexItem>
239
+ <FlexItem>{repo.prs}</FlexItem>
240
+ </Flex>{' '}
241
+ </Td>
242
+ <Td
243
+ dataLabel={columnNames.workspaces}
244
+ compoundExpand={compoundExpandParams(repo, 'workspaces', rowIndex, 3)}
245
+ >
246
+ <Flex spaceItems={{ default: 'spaceItemsSm' }}>
247
+ <FlexItem>
248
+ <CubeIcon key="icon" />
249
+ </FlexItem>
250
+ <FlexItem>{repo.workspaces}</FlexItem>
251
+ </Flex>
252
+ </Td>
253
+ <Td dataLabel={columnNames.lastCommit}>{repo.lastCommit}</Td>
254
+ <Td>
255
+ <a href="#">Open in GitHub</a>
256
+ </Td>
257
+ <Td isActionCell>
258
+ <ActionsColumn items={defaultActions()} />
259
+ </Td>
260
+ </Tr>
261
+
262
+ <Tr isExpanded={isRowExpanded && columnNames[expandedCellKey] === columnNames.branches}>
263
+ <Td dataLabel={columnNames[expandedCellKey]} noPadding colSpan={7}>
264
+ <ExpandableRowContent hasNoBackground>
265
+ <NestedItemsTable />
266
+ </ExpandableRowContent>
267
+ </Td>
268
+ </Tr>
269
+ <Tr isExpanded={isRowExpanded && columnNames[expandedCellKey] === columnNames.prs}>
270
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={7}>
271
+ <ExpandableRowContent>
272
+ <div>Expanded content for {repo.name}: prs goes here!</div>
273
+ </ExpandableRowContent>
274
+ </Td>
275
+ </Tr>
276
+ <Tr isExpanded={isRowExpanded && columnNames[expandedCellKey] === columnNames.workspaces}>
277
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={7}>
278
+ <ExpandableRowContent>
279
+ <div>Expanded content for {repo.name}: workspaces goes here!</div>
280
+ </ExpandableRowContent>
281
+ </Td>
282
+ </Tr>
283
+ </Tbody>
284
+ );
285
+ })}
286
+ </Table>
287
+ {renderPagination('bottom', false)}
285
288
  </PageSection>
286
289
  </DashboardWrapper>
287
290
  );
@@ -156,7 +156,7 @@ export const TableExpandCollapseAll: React.FunctionComponent = () => {
156
156
  aria-label="Collapsible table data"
157
157
  >
158
158
  <Card component="div">
159
- <Table aria-label="Collapsible table">
159
+ <Table isExpandable hasAnimations aria-label="Collapsible table">
160
160
  <Thead>
161
161
  <Tr>
162
162
  <Th
@@ -175,7 +175,7 @@ export const TableExpandCollapseAll: React.FunctionComponent = () => {
175
175
 
176
176
  {serverData.map((server, serverIndex) => (
177
177
  <Tbody key={server.name} isExpanded={isServerExpanded(server)}>
178
- <Tr>
178
+ <Tr isContentExpanded={isServerExpanded(server)}>
179
179
  <Td
180
180
  expand={
181
181
  server.details
@@ -49,14 +49,14 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
49
49
  const sortRows = (rows: SampleDataRow[], sortIndex: number, sortDirection: Direction) =>
50
50
  [...rows].sort((a, b) => {
51
51
  let returnValue = 0;
52
- if (sortIndex === 0 || sortIndex === 7) {
53
- returnValue = 1;
54
- } else if (typeof Object.values(a)[sortIndex] === 'number') {
52
+ if (typeof Object.values(a)[sortIndex] === 'number') {
55
53
  // numeric sort
56
54
  returnValue = Object.values(a)[sortIndex] - Object.values(b)[sortIndex];
57
55
  } else {
58
- // string sort
59
- returnValue = Object.values(a)[sortIndex].localeCompare(Object.values(b)[sortIndex]);
56
+ // string sort using natural sort
57
+ returnValue = Object.values(a)[sortIndex].localeCompare(Object.values(b)[sortIndex], undefined, {
58
+ numeric: true
59
+ });
60
60
  }
61
61
  if (sortDirection === 'desc') {
62
62
  return returnValue * -1;