@patternfly/react-table 6.0.0-alpha.79 → 6.0.0-alpha.80
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 +4 -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/umd/assets/{output-BxiJXuB-.css → output-Cn7EXzA1.css} +7647 -7647
- package/package.json +3 -3
- package/src/demos/examples/TableFilterable.tsx +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.80",
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@patternfly/react-core": "^6.0.0-alpha.
|
|
43
|
+
"@patternfly/react-core": "^6.0.0-alpha.79",
|
|
44
44
|
"@patternfly/react-icons": "^6.0.0-alpha.29",
|
|
45
45
|
"@patternfly/react-styles": "^6.0.0-alpha.28",
|
|
46
46
|
"@patternfly/react-tokens": "^6.0.0-alpha.28",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": "^17 || ^18",
|
|
52
52
|
"react-dom": "^17 || ^18"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "cb1098099e5ccc766571bcd64adc642ee9687f3b"
|
|
55
55
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
Select,
|
|
20
20
|
SelectOption,
|
|
21
21
|
SearchInput,
|
|
22
|
-
|
|
22
|
+
ToolbarLabelGroup
|
|
23
23
|
} from '@patternfly/react-core';
|
|
24
24
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
25
25
|
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
@@ -35,7 +35,7 @@ export const TableFilterable: React.FunctionComponent = () => {
|
|
|
35
35
|
|
|
36
36
|
const rowData = rows.slice(0, 10);
|
|
37
37
|
|
|
38
|
-
const onDelete = (type: string |
|
|
38
|
+
const onDelete = (type: string | ToolbarLabelGroup, id: string) => {
|
|
39
39
|
if (type === 'Location') {
|
|
40
40
|
setFilters({
|
|
41
41
|
...filters,
|
|
@@ -186,8 +186,8 @@ export const TableFilterable: React.FunctionComponent = () => {
|
|
|
186
186
|
return (
|
|
187
187
|
<React.Fragment>
|
|
188
188
|
<ToolbarFilter
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
labels={filters.location}
|
|
190
|
+
deleteLabel={(category, label) => onDelete(category, label as string)}
|
|
191
191
|
categoryName="Location"
|
|
192
192
|
showToolbarItem={currentCategory === 'Location'}
|
|
193
193
|
>
|
|
@@ -217,8 +217,8 @@ export const TableFilterable: React.FunctionComponent = () => {
|
|
|
217
217
|
</Select>
|
|
218
218
|
</ToolbarFilter>
|
|
219
219
|
<ToolbarFilter
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
labels={filters.name}
|
|
221
|
+
deleteLabel={(category, label) => onDelete(category, label as string)}
|
|
222
222
|
categoryName="Name"
|
|
223
223
|
showToolbarItem={currentCategory === 'Name'}
|
|
224
224
|
>
|
|
@@ -234,8 +234,8 @@ export const TableFilterable: React.FunctionComponent = () => {
|
|
|
234
234
|
/>
|
|
235
235
|
</ToolbarFilter>
|
|
236
236
|
<ToolbarFilter
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
labels={filters.status}
|
|
238
|
+
deleteLabel={(category, label) => onDelete(category, label as string)}
|
|
239
239
|
categoryName="Status"
|
|
240
240
|
showToolbarItem={currentCategory === 'Status'}
|
|
241
241
|
>
|
|
@@ -271,7 +271,7 @@ export const TableFilterable: React.FunctionComponent = () => {
|
|
|
271
271
|
|
|
272
272
|
const renderToolbar = () => (
|
|
273
273
|
<Toolbar
|
|
274
|
-
id="toolbar-with-
|
|
274
|
+
id="toolbar-with-label-groups"
|
|
275
275
|
clearAllFilters={() => setFilters({ location: [], name: [], status: [] })}
|
|
276
276
|
collapseListedFiltersBreakpoint="xl"
|
|
277
277
|
>
|