@patternfly/react-table 6.3.1-prerelease.9 → 6.4.0-prerelease.1
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.
- package/CHANGELOG.md +70 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/Table/package.json +1 -1
- package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
- package/dist/dynamic/components/Table/utils/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/esm/components/Table/FavoritesCell.d.ts.map +1 -1
- package/dist/esm/components/Table/FavoritesCell.js +1 -2
- package/dist/esm/components/Table/FavoritesCell.js.map +1 -1
- package/dist/esm/components/Table/SortColumn.d.ts.map +1 -1
- package/dist/esm/components/Table/SortColumn.js +2 -2
- package/dist/esm/components/Table/SortColumn.js.map +1 -1
- package/dist/esm/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/components/Table/Table.js +3 -1
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/js/components/Table/FavoritesCell.d.ts.map +1 -1
- package/dist/js/components/Table/FavoritesCell.js +1 -2
- package/dist/js/components/Table/FavoritesCell.js.map +1 -1
- package/dist/js/components/Table/SortColumn.d.ts.map +1 -1
- package/dist/js/components/Table/SortColumn.js +2 -2
- package/dist/js/components/Table/SortColumn.js.map +1 -1
- package/dist/js/components/Table/Table.d.ts.map +1 -1
- package/dist/js/components/Table/Table.js +3 -1
- package/dist/js/components/Table/Table.js.map +1 -1
- package/dist/umd/assets/{output-xud9LmWy.css → output-E0JqtRXk.css} +4257 -4247
- package/dist/umd/react-table.min.js +3 -3
- package/package.json +6 -6
- package/src/components/Table/FavoritesCell.tsx +2 -2
- package/src/components/Table/SortColumn.tsx +2 -2
- package/src/components/Table/Table.tsx +3 -1
- package/src/components/Table/__tests__/Table.test.tsx +28 -0
- package/src/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +1 -1
- package/src/demos/examples/TableCompact.tsx +36 -39
- package/src/demos/examples/TableEmptyStateDefault.tsx +34 -37
- package/src/demos/examples/TableEmptyStateError.tsx +30 -32
- package/src/demos/examples/TableEmptyStateLoading.tsx +21 -23
- package/src/demos/examples/TableExpandCollapseAll.tsx +48 -50
- package/src/demos/examples/TableSortableResponsive.tsx +77 -80
- package/src/demos/examples/TableStaticBottomPagination.tsx +28 -31
- package/src/demos/examples/TableStickyFirstColumn.tsx +81 -89
- package/src/demos/examples/TableStickyHeader.tsx +32 -34
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Fragment, useEffect, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
-
Card,
|
|
5
4
|
Content,
|
|
6
5
|
Dropdown,
|
|
7
6
|
DropdownList,
|
|
@@ -245,86 +244,84 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
|
|
|
245
244
|
}}
|
|
246
245
|
aria-label="Sortable table data"
|
|
247
246
|
>
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
<
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
247
|
+
{tableToolbar}
|
|
248
|
+
<Table aria-label="Sortable Table">
|
|
249
|
+
<Thead>
|
|
250
|
+
<Tr>
|
|
251
|
+
{columns.map((column, columnIndex) => {
|
|
252
|
+
const sortParams = {
|
|
253
|
+
sort: {
|
|
254
|
+
sortBy: {
|
|
255
|
+
index: activeSortIndex,
|
|
256
|
+
direction: activeSortDirection
|
|
257
|
+
},
|
|
258
|
+
onSort,
|
|
259
|
+
columnIndex
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
return (
|
|
263
|
+
<Th modifier={columnIndex !== 6 ? 'wrap' : undefined} key={columnIndex} {...sortParams}>
|
|
264
|
+
{column}
|
|
265
|
+
</Th>
|
|
266
|
+
);
|
|
267
|
+
})}
|
|
268
|
+
</Tr>
|
|
269
|
+
</Thead>
|
|
270
|
+
<Tbody>
|
|
271
|
+
{sortedRows.map((row, rowIndex) => (
|
|
272
|
+
<Tr key={rowIndex}>
|
|
273
|
+
<>
|
|
274
|
+
<Td dataLabel={columns[0]} width={15}>
|
|
275
|
+
<div>{row.name}</div>
|
|
276
|
+
</Td>
|
|
277
|
+
<Td dataLabel={columns[1]} width={10}>
|
|
278
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
279
|
+
<FlexItem>
|
|
280
|
+
<CodeBranchIcon key="icon" />
|
|
281
|
+
</FlexItem>
|
|
282
|
+
<FlexItem>{row.threads}</FlexItem>
|
|
283
|
+
</Flex>
|
|
284
|
+
</Td>
|
|
285
|
+
<Td dataLabel={columns[2]} width={10}>
|
|
286
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
287
|
+
<FlexItem>
|
|
288
|
+
<CodeIcon key="icon" />
|
|
289
|
+
</FlexItem>
|
|
290
|
+
<FlexItem>{row.applications}</FlexItem>
|
|
291
|
+
</Flex>
|
|
292
|
+
</Td>
|
|
293
|
+
<Td dataLabel={columns[3]} width={10}>
|
|
294
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
295
|
+
<FlexItem>
|
|
296
|
+
<CubeIcon key="icon" />
|
|
297
|
+
</FlexItem>
|
|
298
|
+
<FlexItem>{row.workspaces}</FlexItem>
|
|
299
|
+
</Flex>
|
|
300
|
+
</Td>
|
|
301
|
+
<Td dataLabel={columns[4]} width={15}>
|
|
302
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
303
|
+
<FlexItem>{renderLabel(row.status)}</FlexItem>
|
|
304
|
+
</Flex>
|
|
305
|
+
</Td>
|
|
306
|
+
<Td dataLabel={columns[5]} width={10}>
|
|
307
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
308
|
+
<FlexItem>{row.location}</FlexItem>
|
|
309
|
+
</Flex>
|
|
310
|
+
</Td>
|
|
311
|
+
<Td dataLabel={columns[6]} width={10}>
|
|
312
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
313
|
+
<FlexItem>{row.lastModified[0]} days ago</FlexItem>
|
|
314
|
+
</Flex>
|
|
315
|
+
</Td>
|
|
316
|
+
<Td dataLabel={columns[7]} modifier="truncate">
|
|
317
|
+
<a href="#">{row.url}</a>
|
|
318
|
+
</Td>
|
|
319
|
+
</>
|
|
270
320
|
</Tr>
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<>
|
|
276
|
-
<Td dataLabel={columns[0]} width={15}>
|
|
277
|
-
<div>{row.name}</div>
|
|
278
|
-
</Td>
|
|
279
|
-
<Td dataLabel={columns[1]} width={10}>
|
|
280
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
281
|
-
<FlexItem>
|
|
282
|
-
<CodeBranchIcon key="icon" />
|
|
283
|
-
</FlexItem>
|
|
284
|
-
<FlexItem>{row.threads}</FlexItem>
|
|
285
|
-
</Flex>
|
|
286
|
-
</Td>
|
|
287
|
-
<Td dataLabel={columns[2]} width={10}>
|
|
288
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
289
|
-
<FlexItem>
|
|
290
|
-
<CodeIcon key="icon" />
|
|
291
|
-
</FlexItem>
|
|
292
|
-
<FlexItem>{row.applications}</FlexItem>
|
|
293
|
-
</Flex>
|
|
294
|
-
</Td>
|
|
295
|
-
<Td dataLabel={columns[3]} width={10}>
|
|
296
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
297
|
-
<FlexItem>
|
|
298
|
-
<CubeIcon key="icon" />
|
|
299
|
-
</FlexItem>
|
|
300
|
-
<FlexItem>{row.workspaces}</FlexItem>
|
|
301
|
-
</Flex>
|
|
302
|
-
</Td>
|
|
303
|
-
<Td dataLabel={columns[4]} width={15}>
|
|
304
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
305
|
-
<FlexItem>{renderLabel(row.status)}</FlexItem>
|
|
306
|
-
</Flex>
|
|
307
|
-
</Td>
|
|
308
|
-
<Td dataLabel={columns[5]} width={10}>
|
|
309
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
310
|
-
<FlexItem>{row.location}</FlexItem>
|
|
311
|
-
</Flex>
|
|
312
|
-
</Td>
|
|
313
|
-
<Td dataLabel={columns[6]} width={10}>
|
|
314
|
-
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
315
|
-
<FlexItem>{row.lastModified[0]} days ago</FlexItem>
|
|
316
|
-
</Flex>
|
|
317
|
-
</Td>
|
|
318
|
-
<Td dataLabel={columns[7]} modifier="truncate">
|
|
319
|
-
<a href="#">{row.url}</a>
|
|
320
|
-
</Td>
|
|
321
|
-
</>
|
|
322
|
-
</Tr>
|
|
323
|
-
))}
|
|
324
|
-
</Tbody>
|
|
325
|
-
</Table>
|
|
326
|
-
{renderPagination('bottom', false)}
|
|
327
|
-
</Card>
|
|
321
|
+
))}
|
|
322
|
+
</Tbody>
|
|
323
|
+
</Table>
|
|
324
|
+
{renderPagination('bottom', false)}
|
|
328
325
|
</PageSection>
|
|
329
326
|
</DashboardWrapper>
|
|
330
327
|
</Fragment>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Fragment, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
-
Card,
|
|
5
4
|
Toolbar,
|
|
6
5
|
ToolbarContent,
|
|
7
6
|
ToolbarGroup,
|
|
@@ -143,37 +142,35 @@ export const TableStaticBottomPagination: React.FunctionComponent = () => {
|
|
|
143
142
|
<Fragment>
|
|
144
143
|
<DashboardWrapper hasPageTemplateTitle>
|
|
145
144
|
<PageSection isFilled aria-label="Paginated table data">
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
<Th key={columnIndex}>{column}</Th>
|
|
153
|
-
))}
|
|
154
|
-
</Tr>
|
|
155
|
-
</Thead>
|
|
156
|
-
<Tbody>
|
|
157
|
-
{paginatedRows.map((row, rowIndex) => (
|
|
158
|
-
<Tr key={rowIndex}>
|
|
159
|
-
<Td dataLabel={columns[0]}>{row.name}</Td>
|
|
160
|
-
<Td dataLabel={columns[1]}>{row.threads}</Td>
|
|
161
|
-
<Td dataLabel={columns[2]}>{row.applications}</Td>
|
|
162
|
-
<Td dataLabel={columns[3]}>{row.workspaces}</Td>
|
|
163
|
-
<Td dataLabel={columns[4]}>{renderLabel(row.status)}</Td>
|
|
164
|
-
<Td dataLabel={columns[5]}>{row.location}</Td>
|
|
165
|
-
<Td dataLabel={columns[6]}>{row.lastModified}</Td>
|
|
166
|
-
<Td dataLabel={columns[7]} modifier="truncate">
|
|
167
|
-
<TableText>
|
|
168
|
-
<a href="#">{row.url}</a>
|
|
169
|
-
</TableText>
|
|
170
|
-
</Td>
|
|
171
|
-
</Tr>
|
|
145
|
+
{tableToolbar}
|
|
146
|
+
<Table variant="compact" aria-label="Paginated Table">
|
|
147
|
+
<Thead>
|
|
148
|
+
<Tr>
|
|
149
|
+
{columns.map((column, columnIndex) => (
|
|
150
|
+
<Th key={columnIndex}>{column}</Th>
|
|
172
151
|
))}
|
|
173
|
-
</
|
|
174
|
-
</
|
|
175
|
-
|
|
176
|
-
|
|
152
|
+
</Tr>
|
|
153
|
+
</Thead>
|
|
154
|
+
<Tbody>
|
|
155
|
+
{paginatedRows.map((row, rowIndex) => (
|
|
156
|
+
<Tr key={rowIndex}>
|
|
157
|
+
<Td dataLabel={columns[0]}>{row.name}</Td>
|
|
158
|
+
<Td dataLabel={columns[1]}>{row.threads}</Td>
|
|
159
|
+
<Td dataLabel={columns[2]}>{row.applications}</Td>
|
|
160
|
+
<Td dataLabel={columns[3]}>{row.workspaces}</Td>
|
|
161
|
+
<Td dataLabel={columns[4]}>{renderLabel(row.status)}</Td>
|
|
162
|
+
<Td dataLabel={columns[5]}>{row.location}</Td>
|
|
163
|
+
<Td dataLabel={columns[6]}>{row.lastModified}</Td>
|
|
164
|
+
<Td dataLabel={columns[7]} modifier="truncate">
|
|
165
|
+
<TableText>
|
|
166
|
+
<a href="#">{row.url}</a>
|
|
167
|
+
</TableText>
|
|
168
|
+
</Td>
|
|
169
|
+
</Tr>
|
|
170
|
+
))}
|
|
171
|
+
</Tbody>
|
|
172
|
+
</Table>
|
|
173
|
+
{renderPagination('bottom', false)}
|
|
177
174
|
</PageSection>
|
|
178
175
|
</DashboardWrapper>
|
|
179
176
|
</Fragment>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Table, Thead, Tr, Th, Tbody, Td, InnerScrollContainer } from '@patternfly/react-table';
|
|
3
|
-
import {
|
|
3
|
+
import { PageSection } from '@patternfly/react-core';
|
|
4
4
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
5
5
|
|
|
6
6
|
type Direction = 'asc' | 'desc' | undefined;
|
|
@@ -140,96 +140,88 @@ export const TableStickyFirstColumn = () => {
|
|
|
140
140
|
padding={{ default: 'noPadding', xl: 'padding' }}
|
|
141
141
|
aria-label="Sticky column table data"
|
|
142
142
|
>
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
143
|
+
<InnerScrollContainer>
|
|
144
|
+
<Table aria-label="Sticky column table" gridBreakPoint="">
|
|
145
|
+
<Thead>
|
|
146
|
+
<Tr>
|
|
147
|
+
<Th isStickyColumn stickyMinWidth="100px" hasRightBorder modifier="fitContent" sort={getSortParams(0)}>
|
|
148
|
+
{columnNames.name}
|
|
149
|
+
</Th>
|
|
150
|
+
<Th modifier="fitContent" sort={getSortParams(1)}>
|
|
151
|
+
{columnNames.state}
|
|
152
|
+
</Th>
|
|
153
|
+
<Th>{columnNames.header3}</Th>
|
|
154
|
+
<Th>{columnNames.header4}</Th>
|
|
155
|
+
<Th>{columnNames.header5}</Th>
|
|
156
|
+
<Th>{columnNames.header6}</Th>
|
|
157
|
+
<Th>{columnNames.header7}</Th>
|
|
158
|
+
<Th>{columnNames.header8}</Th>
|
|
159
|
+
<Th>{columnNames.header9}</Th>
|
|
160
|
+
<Th>{columnNames.header10}</Th>
|
|
161
|
+
<Th>{columnNames.header11}</Th>
|
|
162
|
+
<Th>{columnNames.header12}</Th>
|
|
163
|
+
<Th>{columnNames.header13}</Th>
|
|
164
|
+
<Th>{columnNames.header14}</Th>
|
|
165
|
+
<Th>{columnNames.header15}</Th>
|
|
166
|
+
<Th>{columnNames.header16}</Th>
|
|
167
|
+
</Tr>
|
|
168
|
+
</Thead>
|
|
169
|
+
<Tbody>
|
|
170
|
+
{sortedFacts.map((fact) => (
|
|
171
|
+
<Tr key={fact.name}>
|
|
172
|
+
<Th isStickyColumn stickyMinWidth="100px" hasRightBorder modifier="truncate">
|
|
173
|
+
{fact.name}
|
|
156
174
|
</Th>
|
|
157
|
-
<
|
|
158
|
-
{
|
|
159
|
-
</
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<
|
|
173
|
-
|
|
175
|
+
<Td modifier="nowrap" dataLabel={columnNames.state}>
|
|
176
|
+
{fact.state}
|
|
177
|
+
</Td>
|
|
178
|
+
<Td modifier="nowrap" dataLabel={columnNames.header3}>
|
|
179
|
+
{fact.detail1}
|
|
180
|
+
</Td>
|
|
181
|
+
<Td modifier="nowrap" dataLabel={columnNames.header4}>
|
|
182
|
+
{fact.detail2}
|
|
183
|
+
</Td>
|
|
184
|
+
<Td modifier="nowrap" dataLabel={columnNames.header5}>
|
|
185
|
+
{fact.detail3}
|
|
186
|
+
</Td>
|
|
187
|
+
<Td modifier="nowrap" dataLabel={columnNames.header6}>
|
|
188
|
+
{fact.detail4}
|
|
189
|
+
</Td>
|
|
190
|
+
<Td modifier="nowrap" dataLabel={columnNames.header7}>
|
|
191
|
+
{fact.detail5}
|
|
192
|
+
</Td>
|
|
193
|
+
<Td modifier="nowrap" dataLabel={columnNames.header8}>
|
|
194
|
+
{fact.detail6}
|
|
195
|
+
</Td>
|
|
196
|
+
<Td modifier="nowrap" dataLabel={columnNames.header9}>
|
|
197
|
+
{fact.detail7}
|
|
198
|
+
</Td>
|
|
199
|
+
<Td modifier="nowrap" dataLabel={columnNames.header10}>
|
|
200
|
+
{fact.detail8}
|
|
201
|
+
</Td>
|
|
202
|
+
<Td modifier="nowrap" dataLabel={columnNames.header11}>
|
|
203
|
+
{fact.detail9}
|
|
204
|
+
</Td>
|
|
205
|
+
<Td modifier="nowrap" dataLabel={columnNames.header12}>
|
|
206
|
+
{fact.detail10}
|
|
207
|
+
</Td>
|
|
208
|
+
<Td modifier="nowrap" dataLabel={columnNames.header13}>
|
|
209
|
+
{fact.detail11}
|
|
210
|
+
</Td>
|
|
211
|
+
<Td modifier="nowrap" dataLabel={columnNames.header14}>
|
|
212
|
+
{fact.detail12}
|
|
213
|
+
</Td>
|
|
214
|
+
<Td modifier="nowrap" dataLabel={columnNames.header15}>
|
|
215
|
+
{fact.detail13}
|
|
216
|
+
</Td>
|
|
217
|
+
<Td modifier="nowrap" dataLabel={columnNames.header16}>
|
|
218
|
+
{fact.detail14}
|
|
219
|
+
</Td>
|
|
174
220
|
</Tr>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<Th isStickyColumn stickyMinWidth="100px" hasRightBorder modifier="truncate">
|
|
180
|
-
{fact.name}
|
|
181
|
-
</Th>
|
|
182
|
-
<Td modifier="nowrap" dataLabel={columnNames.state}>
|
|
183
|
-
{fact.state}
|
|
184
|
-
</Td>
|
|
185
|
-
<Td modifier="nowrap" dataLabel={columnNames.header3}>
|
|
186
|
-
{fact.detail1}
|
|
187
|
-
</Td>
|
|
188
|
-
<Td modifier="nowrap" dataLabel={columnNames.header4}>
|
|
189
|
-
{fact.detail2}
|
|
190
|
-
</Td>
|
|
191
|
-
<Td modifier="nowrap" dataLabel={columnNames.header5}>
|
|
192
|
-
{fact.detail3}
|
|
193
|
-
</Td>
|
|
194
|
-
<Td modifier="nowrap" dataLabel={columnNames.header6}>
|
|
195
|
-
{fact.detail4}
|
|
196
|
-
</Td>
|
|
197
|
-
<Td modifier="nowrap" dataLabel={columnNames.header7}>
|
|
198
|
-
{fact.detail5}
|
|
199
|
-
</Td>
|
|
200
|
-
<Td modifier="nowrap" dataLabel={columnNames.header8}>
|
|
201
|
-
{fact.detail6}
|
|
202
|
-
</Td>
|
|
203
|
-
<Td modifier="nowrap" dataLabel={columnNames.header9}>
|
|
204
|
-
{fact.detail7}
|
|
205
|
-
</Td>
|
|
206
|
-
<Td modifier="nowrap" dataLabel={columnNames.header10}>
|
|
207
|
-
{fact.detail8}
|
|
208
|
-
</Td>
|
|
209
|
-
<Td modifier="nowrap" dataLabel={columnNames.header11}>
|
|
210
|
-
{fact.detail9}
|
|
211
|
-
</Td>
|
|
212
|
-
<Td modifier="nowrap" dataLabel={columnNames.header12}>
|
|
213
|
-
{fact.detail10}
|
|
214
|
-
</Td>
|
|
215
|
-
<Td modifier="nowrap" dataLabel={columnNames.header13}>
|
|
216
|
-
{fact.detail11}
|
|
217
|
-
</Td>
|
|
218
|
-
<Td modifier="nowrap" dataLabel={columnNames.header14}>
|
|
219
|
-
{fact.detail12}
|
|
220
|
-
</Td>
|
|
221
|
-
<Td modifier="nowrap" dataLabel={columnNames.header15}>
|
|
222
|
-
{fact.detail13}
|
|
223
|
-
</Td>
|
|
224
|
-
<Td modifier="nowrap" dataLabel={columnNames.header16}>
|
|
225
|
-
{fact.detail14}
|
|
226
|
-
</Td>
|
|
227
|
-
</Tr>
|
|
228
|
-
))}
|
|
229
|
-
</Tbody>
|
|
230
|
-
</Table>
|
|
231
|
-
</InnerScrollContainer>
|
|
232
|
-
</Card>
|
|
221
|
+
))}
|
|
222
|
+
</Tbody>
|
|
223
|
+
</Table>
|
|
224
|
+
</InnerScrollContainer>
|
|
233
225
|
</PageSection>
|
|
234
226
|
</DashboardWrapper>
|
|
235
227
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Label, PageSection } from '@patternfly/react-core';
|
|
2
2
|
import { Table, Thead, Tr, Th, Tbody, Td, TableText } from '@patternfly/react-table';
|
|
3
3
|
import { DashboardWrapper } from '@patternfly/react-table/dist/esm/demos/DashboardWrapper';
|
|
4
4
|
import { rows, columns } from '@patternfly/react-table/dist/esm/demos/sampleData';
|
|
@@ -20,40 +20,38 @@ export const TableStickyHeader: React.FunctionComponent = () => {
|
|
|
20
20
|
return (
|
|
21
21
|
<DashboardWrapper hasPageTemplateTitle>
|
|
22
22
|
<PageSection padding={{ default: 'noPadding', xl: 'padding' }} aria-label="Sticky header table data">
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<Table aria-label="Sticky Header Table Demo" isStickyHeader>
|
|
24
|
+
<Thead>
|
|
25
|
+
<Tr>
|
|
26
|
+
<Th width={15}>{columns[0]}</Th>
|
|
27
|
+
<Th width={10}>{columns[1]}</Th>
|
|
28
|
+
<Th width={10}>{columns[2]}</Th>
|
|
29
|
+
<Th width={10}>{columns[3]}</Th>
|
|
30
|
+
<Th width={10}>{columns[4]}</Th>
|
|
31
|
+
<Th width={15}>{columns[5]}</Th>
|
|
32
|
+
<Th width={15}>{columns[6]}</Th>
|
|
33
|
+
<Th width={10}>{columns[7]}</Th>
|
|
34
|
+
</Tr>
|
|
35
|
+
</Thead>
|
|
36
|
+
<Tbody>
|
|
37
|
+
{rows.map((row) => (
|
|
38
|
+
<Tr key={row.name}>
|
|
39
|
+
<Td dataLabel={columns[0]}>{row.name}</Td>
|
|
40
|
+
<Td dataLabel={columns[1]}>{row.threads}</Td>
|
|
41
|
+
<Td dataLabel={columns[2]}>{row.applications}</Td>
|
|
42
|
+
<Td dataLabel={columns[3]}>{row.workspaces}</Td>
|
|
43
|
+
<Td dataLabel={columns[4]}>{renderLabel(row.status)}</Td>
|
|
44
|
+
<Td dataLabel={columns[5]}>{row.location}</Td>
|
|
45
|
+
<Td dataLabel={columns[6]}>{row.lastModified}</Td>
|
|
46
|
+
<Td dataLabel={columns[7]}>
|
|
47
|
+
<a href="#">
|
|
48
|
+
<TableText wrapModifier="truncate">{row.url} </TableText>
|
|
49
|
+
</a>
|
|
50
|
+
</Td>
|
|
35
51
|
</Tr>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<Tr key={row.name}>
|
|
40
|
-
<Td dataLabel={columns[0]}>{row.name}</Td>
|
|
41
|
-
<Td dataLabel={columns[1]}>{row.threads}</Td>
|
|
42
|
-
<Td dataLabel={columns[2]}>{row.applications}</Td>
|
|
43
|
-
<Td dataLabel={columns[3]}>{row.workspaces}</Td>
|
|
44
|
-
<Td dataLabel={columns[4]}>{renderLabel(row.status)}</Td>
|
|
45
|
-
<Td dataLabel={columns[5]}>{row.location}</Td>
|
|
46
|
-
<Td dataLabel={columns[6]}>{row.lastModified}</Td>
|
|
47
|
-
<Td dataLabel={columns[7]}>
|
|
48
|
-
<a href="#">
|
|
49
|
-
<TableText wrapModifier="truncate">{row.url} </TableText>
|
|
50
|
-
</a>
|
|
51
|
-
</Td>
|
|
52
|
-
</Tr>
|
|
53
|
-
))}
|
|
54
|
-
</Tbody>
|
|
55
|
-
</Table>
|
|
56
|
-
</Card>
|
|
52
|
+
))}
|
|
53
|
+
</Tbody>
|
|
54
|
+
</Table>
|
|
57
55
|
</PageSection>
|
|
58
56
|
</DashboardWrapper>
|
|
59
57
|
);
|