@patternfly/react-table 4.71.0 → 4.71.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 +8 -0
- package/dist/esm/components/Table/base/types.d.ts +2 -0
- package/dist/esm/components/Table/base/types.d.ts.map +1 -1
- package/dist/esm/components/Table/base/types.js.map +1 -1
- package/dist/esm/components/TableComposable/Td.d.ts.map +1 -1
- package/dist/esm/components/TableComposable/Td.js +1 -0
- package/dist/esm/components/TableComposable/Td.js.map +1 -1
- package/dist/js/components/Table/base/types.d.ts +2 -0
- package/dist/js/components/Table/base/types.d.ts.map +1 -1
- package/dist/js/components/Table/base/types.js.map +1 -1
- package/dist/js/components/TableComposable/Td.d.ts.map +1 -1
- package/dist/js/components/TableComposable/Td.js +1 -0
- package/dist/js/components/TableComposable/Td.js.map +1 -1
- package/dist/umd/react-table.css +44 -44
- package/dist/umd/react-table.js +1 -0
- package/dist/umd/react-table.min.js +1 -1
- package/package.json +6 -6
- package/src/components/Table/base/types.tsx +2 -0
- package/src/components/TableComposable/Td.tsx +1 -0
- package/src/components/TableComposable/examples/ComposableTable.md +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "4.71.
|
|
3
|
+
"version": "4.71.1",
|
|
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.202.
|
|
35
|
-
"@patternfly/react-icons": "^4.53.
|
|
36
|
-
"@patternfly/react-styles": "^4.52.
|
|
37
|
-
"@patternfly/react-tokens": "^4.54.
|
|
34
|
+
"@patternfly/react-core": "^4.202.1",
|
|
35
|
+
"@patternfly/react-icons": "^4.53.1",
|
|
36
|
+
"@patternfly/react-styles": "^4.52.1",
|
|
37
|
+
"@patternfly/react-tokens": "^4.54.1",
|
|
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": "
|
|
49
|
+
"gitHead": "fc88ddd5f942598163a34ad5a8df86215cc7a6a5"
|
|
50
50
|
}
|
|
@@ -111,6 +111,7 @@ const TdBase: React.FunctionComponent<TdProps> = ({
|
|
|
111
111
|
const actionParamsFunc = actions ? cellActions(actions.items, null, null) : null;
|
|
112
112
|
const actionParams = actionParamsFunc
|
|
113
113
|
? actionParamsFunc(null, {
|
|
114
|
+
rowIndex: actions?.rowIndex,
|
|
114
115
|
rowData: {
|
|
115
116
|
disableActions: actions?.disable
|
|
116
117
|
},
|
|
@@ -311,6 +311,16 @@ To make a row draggable:
|
|
|
311
311
|
```ts isBeta file="ComposableTableDraggable.tsx"
|
|
312
312
|
```
|
|
313
313
|
|
|
314
|
+
## Sticky table modifiers
|
|
315
|
+
|
|
316
|
+
**Note:** Sticky table headers and columns have a higher `z-index` than the `z-index` used for menus (dropdown, select, etc). The intent is that the contents of a scrollable table will scroll under the sticky header/column, including any expanded menus. However, there may be use cases where a menu needs to appear on top of a sticky header/column, such as an expanded menu in a toolbar above a table with a sticky header.
|
|
317
|
+
|
|
318
|
+
There are a few ways this can be handled:
|
|
319
|
+
|
|
320
|
+
- Manipulate the `z-index` of the menu and/or table headers/columns manually.
|
|
321
|
+
- Use the `menuAppendTo` prop in non-composable react components with menus to append the menu to an element outside of the table (e.g., the table's parent element) so that the menu has a higher stacking context than - and can appear on top of - sticky headers/columns as well as appear outside of any scrollable content in the table.
|
|
322
|
+
- In the case where the menu is outside of the table (e.g., above the table in a toolbar, or below the table and the menu expands up), assign the entire table a lower `z-index` than the `z-index` of the menu. This creates a lower stacking context for the entire table compared to the menu, while preserving the stacking context of the elements inside of the table.
|
|
323
|
+
|
|
314
324
|
### Composable: Sticky column
|
|
315
325
|
|
|
316
326
|
To make a column sticky, wrap `TableComposable` with `InnerScrollContainer` and add the following properties to the `Th` that should be sticky: `isStickyColumn` and `hasRightBorder`. To prevent the default text wrapping behavior and allow horizontal scrolling, all `Th` should also have the `modifier="nowrap"` property. To set the minimum width of the sticky column, use the `stickyMinWidth` property.
|
|
@@ -332,7 +342,7 @@ To maintain proper sticky behavior across sticky columns and header, `TableCompo
|
|
|
332
342
|
```ts file="ComposableTableStickyColumnsAndHeader.tsx"
|
|
333
343
|
```
|
|
334
344
|
|
|
335
|
-
|
|
345
|
+
## Nested column headers
|
|
336
346
|
|
|
337
347
|
To make a nested column header:
|
|
338
348
|
|
|
@@ -345,6 +355,8 @@ The first `Tr` represents the top level of columns, and each must pass either `r
|
|
|
345
355
|
|
|
346
356
|
The second `Tr` represents the second level of sub columns. The `Th` in this row each should pass `isSubHeader`, and the last sub column of a column should also pass `hasRightBorder`.
|
|
347
357
|
|
|
358
|
+
### Composable: Nested column headers
|
|
359
|
+
|
|
348
360
|
```ts file="ComposableTableNestedHeaders.tsx"
|
|
349
361
|
```
|
|
350
362
|
|
|
@@ -358,6 +370,8 @@ The second `Tr` represents the second level of sub columns. The `Th` in this row
|
|
|
358
370
|
```ts file="ComposableTableNestedTableExpandable.tsx"
|
|
359
371
|
```
|
|
360
372
|
|
|
373
|
+
## Striped
|
|
374
|
+
|
|
361
375
|
### Composable: Striped
|
|
362
376
|
|
|
363
377
|
To apply striping to a basic table, add the `isStriped` property to `TableComposable`.
|