@patternfly/react-core 4.225.9 → 4.226.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.
- package/CHANGELOG.md +30 -0
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +3 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +23 -25
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +3 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +23 -25
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/umd/react-core.js +26 -26
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/CalendarMonth/CalendarMonth.tsx +3 -1
- package/src/components/CalendarMonth/__tests__/CalendarMonth.test.tsx +30 -2
- package/src/components/Select/Select.tsx +33 -35
- package/src/demos/NotificationDrawer/NotificationDrawer.md +8 -20
- package/src/demos/PrimaryDetail.md +283 -77
|
@@ -5,6 +5,7 @@ section: demos
|
|
|
5
5
|
|
|
6
6
|
import DashboardWrapper from './examples/DashboardWrapper';
|
|
7
7
|
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
|
|
8
|
+
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
|
|
8
9
|
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
|
|
9
10
|
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
10
11
|
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
@@ -954,12 +955,17 @@ import React from 'react';
|
|
|
954
955
|
import {
|
|
955
956
|
Button,
|
|
956
957
|
Card,
|
|
958
|
+
CardActions,
|
|
957
959
|
CardHeader,
|
|
958
960
|
CardBody,
|
|
959
961
|
CardTitle,
|
|
962
|
+
Checkbox,
|
|
960
963
|
Divider,
|
|
961
964
|
Dropdown,
|
|
965
|
+
DropdownToggle,
|
|
966
|
+
DropdownToggleCheckbox,
|
|
962
967
|
DropdownItem,
|
|
968
|
+
DropdownPosition,
|
|
963
969
|
DropdownSeparator,
|
|
964
970
|
Drawer,
|
|
965
971
|
DrawerActions,
|
|
@@ -969,14 +975,10 @@ import {
|
|
|
969
975
|
DrawerContentBody,
|
|
970
976
|
DrawerHead,
|
|
971
977
|
DrawerPanelContent,
|
|
972
|
-
DrawerSection,
|
|
973
978
|
Flex,
|
|
974
979
|
FlexItem,
|
|
975
980
|
Gallery,
|
|
976
981
|
KebabToggle,
|
|
977
|
-
OverflowMenu,
|
|
978
|
-
OverflowMenuControl,
|
|
979
|
-
OverflowMenuItem,
|
|
980
982
|
PageSection,
|
|
981
983
|
PageSectionVariants,
|
|
982
984
|
Pagination,
|
|
@@ -990,10 +992,10 @@ import {
|
|
|
990
992
|
Toolbar,
|
|
991
993
|
ToolbarItem,
|
|
992
994
|
ToolbarContent,
|
|
993
|
-
ToolbarFilter
|
|
994
|
-
ToolbarToggleGroup
|
|
995
|
+
ToolbarFilter
|
|
995
996
|
} from '@patternfly/react-core';
|
|
996
997
|
import DashboardWrapper from './examples/DashboardWrapper';
|
|
998
|
+
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
|
|
997
999
|
import pfIcon from './pf-logo-small.svg';
|
|
998
1000
|
import activeMQIcon from './activemq-core_200x150.png';
|
|
999
1001
|
import avroIcon from './camel-avro_200x150.png';
|
|
@@ -1012,7 +1014,12 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1012
1014
|
this.state = {
|
|
1013
1015
|
page: 1,
|
|
1014
1016
|
perPage: 10,
|
|
1017
|
+
totalItemCount: 10,
|
|
1015
1018
|
isDrawerExpanded: false,
|
|
1019
|
+
isChecked: false,
|
|
1020
|
+
selectedItems: [],
|
|
1021
|
+
areAllSelected: false,
|
|
1022
|
+
splitButtonDropdownIsOpen: false,
|
|
1016
1023
|
activeCard: null,
|
|
1017
1024
|
filters: {
|
|
1018
1025
|
products: []
|
|
@@ -1032,7 +1039,7 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1032
1039
|
}));
|
|
1033
1040
|
};
|
|
1034
1041
|
|
|
1035
|
-
this.onToolbarDropdownSelect =
|
|
1042
|
+
this.onToolbarDropdownSelect = _event => {
|
|
1036
1043
|
this.setState({
|
|
1037
1044
|
isLowerToolbarDropdownOpen: !this.state.isLowerToolbarDropdownOpen
|
|
1038
1045
|
});
|
|
@@ -1044,24 +1051,23 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1044
1051
|
});
|
|
1045
1052
|
};
|
|
1046
1053
|
|
|
1047
|
-
this.onToolbarKebabDropdownSelect =
|
|
1054
|
+
this.onToolbarKebabDropdownSelect = _event => {
|
|
1048
1055
|
this.setState({
|
|
1049
1056
|
isLowerToolbarKebabDropdownOpen: !this.state.isLowerToolbarKebabDropdownOpen
|
|
1050
1057
|
});
|
|
1051
1058
|
};
|
|
1052
1059
|
|
|
1053
|
-
this.
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
});
|
|
1060
|
+
this.checkAllSelected = (selected, total) => {
|
|
1061
|
+
if (selected && selected < total) {
|
|
1062
|
+
return null;
|
|
1063
|
+
}
|
|
1064
|
+
return selected === total;
|
|
1059
1065
|
};
|
|
1060
1066
|
|
|
1061
1067
|
this.onNameSelect = (event, selection) => {
|
|
1062
1068
|
const checked = event.target.checked;
|
|
1063
1069
|
this.setState(prevState => {
|
|
1064
|
-
const prevSelections = prevState.filters
|
|
1070
|
+
const prevSelections = prevState.filters.products;
|
|
1065
1071
|
return {
|
|
1066
1072
|
filters: {
|
|
1067
1073
|
...prevState.filters,
|
|
@@ -1095,22 +1101,27 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1095
1101
|
});
|
|
1096
1102
|
};
|
|
1097
1103
|
|
|
1098
|
-
this.
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1104
|
+
this.onCheckboxClick = (event, productId) => {
|
|
1105
|
+
event.stopPropagation();
|
|
1106
|
+
this.setState(prevState =>
|
|
1107
|
+
prevState.selectedItems.includes(productId * 1) || this.state.selectedItems.includes(productId * 1)
|
|
1108
|
+
? {
|
|
1109
|
+
selectedItems: [...this.state.selectedItems.filter(id => productId * 1 !== id)],
|
|
1110
|
+
areAllSelected: this.checkAllSelected(prevState.selectedItems.length - 1, prevState.totalItemCount)
|
|
1111
|
+
}
|
|
1112
|
+
: {
|
|
1113
|
+
selectedItems: [...prevState.selectedItems, productId * 1],
|
|
1114
|
+
areAllSelected: this.checkAllSelected(prevState.selectedItems.length + 1, prevState.totalItemCount)
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1110
1117
|
};
|
|
1111
1118
|
|
|
1112
1119
|
this.onCardClick = event => {
|
|
1113
1120
|
if (event.currentTarget.id === this.state.activeCard) {
|
|
1121
|
+
this.setState({
|
|
1122
|
+
isDrawerExpanded: !this.state.isDrawerExpanded,
|
|
1123
|
+
activeCard: null
|
|
1124
|
+
});
|
|
1114
1125
|
return;
|
|
1115
1126
|
}
|
|
1116
1127
|
|
|
@@ -1140,6 +1151,135 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1140
1151
|
this.onSetPage = (_evt, page) => {
|
|
1141
1152
|
this.setState({ page });
|
|
1142
1153
|
};
|
|
1154
|
+
|
|
1155
|
+
this.selectPage = () => {
|
|
1156
|
+
const { totalItemCount, perPage } = this.state;
|
|
1157
|
+
let collection = [];
|
|
1158
|
+
|
|
1159
|
+
collection = this.getAllItems();
|
|
1160
|
+
|
|
1161
|
+
this.setState(
|
|
1162
|
+
{
|
|
1163
|
+
selectedItems: collection,
|
|
1164
|
+
areAllSelected: totalItemCount === perPage ? true : false
|
|
1165
|
+
},
|
|
1166
|
+
this.updateSelected
|
|
1167
|
+
);
|
|
1168
|
+
};
|
|
1169
|
+
|
|
1170
|
+
this.selectAll = () => {
|
|
1171
|
+
let collection = [];
|
|
1172
|
+
for (let i = 0; i <= 9; i++) {
|
|
1173
|
+
collection = [...collection, i];
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
this.setState(
|
|
1177
|
+
{
|
|
1178
|
+
selectedItems: collection,
|
|
1179
|
+
isChecked: true,
|
|
1180
|
+
areAllSelected: true
|
|
1181
|
+
},
|
|
1182
|
+
this.updateSelected
|
|
1183
|
+
);
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
this.selectNone = () => {
|
|
1187
|
+
this.setState(
|
|
1188
|
+
{
|
|
1189
|
+
selectedItems: [],
|
|
1190
|
+
isChecked: false,
|
|
1191
|
+
areAllSelected: false,
|
|
1192
|
+
isDrawerExpanded: false,
|
|
1193
|
+
activeCard: null
|
|
1194
|
+
},
|
|
1195
|
+
this.updateSelected
|
|
1196
|
+
);
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
this.splitCheckboxSelectAll = e => {
|
|
1200
|
+
const { checked } = e.target;
|
|
1201
|
+
const { isChecked } = this.state;
|
|
1202
|
+
let collection = [];
|
|
1203
|
+
|
|
1204
|
+
if (checked) {
|
|
1205
|
+
for (let i = 0; i <= 9; i++) {
|
|
1206
|
+
collection = [...collection, i];
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
this.setState(
|
|
1211
|
+
{
|
|
1212
|
+
selectedItems: collection,
|
|
1213
|
+
areAllSelected: checked,
|
|
1214
|
+
isDrawerExpanded: false,
|
|
1215
|
+
activeCard: null,
|
|
1216
|
+
isChecked
|
|
1217
|
+
},
|
|
1218
|
+
this.updateSelected
|
|
1219
|
+
);
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
this.onSplitButtonSelect = _event => {
|
|
1223
|
+
this.setState((prevState, _props) => ({
|
|
1224
|
+
splitButtonDropdownIsOpen: !prevState.splitButtonDropdownIsOpen,
|
|
1225
|
+
isDrawerExpanded: false,
|
|
1226
|
+
activeCard: null
|
|
1227
|
+
}));
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
this.onSplitButtonToggle = isOpen => {
|
|
1231
|
+
this.setState({
|
|
1232
|
+
splitButtonDropdownIsOpen: isOpen
|
|
1233
|
+
});
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
this.onCardKebabDropdownToggle = (event, key, isCardKebabDropdownOpen) => {
|
|
1237
|
+
event.stopPropagation();
|
|
1238
|
+
this.setState({
|
|
1239
|
+
[key]: isCardKebabDropdownOpen
|
|
1240
|
+
});
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
this.onCardKebabDropdownSelect = (key, _event) => {
|
|
1244
|
+
this.setState({
|
|
1245
|
+
[key]: !this.state[key]
|
|
1246
|
+
});
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
this.deleteItem = (event, item) => {
|
|
1250
|
+
event.stopPropagation();
|
|
1251
|
+
const filter = getter => val => getter(val) !== item.id;
|
|
1252
|
+
const filteredCards = this.state.res.filter(filter(({ id }) => id));
|
|
1253
|
+
this.setState({
|
|
1254
|
+
res: filteredCards,
|
|
1255
|
+
selectedItems: this.state.selectedItems.filter(filter(id => id)),
|
|
1256
|
+
totalItemCount: this.state.totalItemCount - 1,
|
|
1257
|
+
isDrawerExpanded: false,
|
|
1258
|
+
activeCard: null
|
|
1259
|
+
});
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
this.onKeyDown = event => {
|
|
1263
|
+
if (event.target !== event.currentTarget) {
|
|
1264
|
+
return;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
if ([13, 32].includes(event.keyCode)) {
|
|
1268
|
+
if (event.currentTarget.id === this.state.activeCard) {
|
|
1269
|
+
this.setState({
|
|
1270
|
+
isDrawerExpanded: !this.state.isDrawerExpanded,
|
|
1271
|
+
activeCard: null
|
|
1272
|
+
});
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
event.preventDefault();
|
|
1276
|
+
const newSelected = event.currentTarget.id;
|
|
1277
|
+
this.setState({
|
|
1278
|
+
activeCard: newSelected,
|
|
1279
|
+
isDrawerExpanded: true
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1143
1283
|
}
|
|
1144
1284
|
|
|
1145
1285
|
getAllItems() {
|
|
@@ -1197,16 +1337,60 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1197
1337
|
);
|
|
1198
1338
|
}
|
|
1199
1339
|
|
|
1340
|
+
buildSelectDropdown() {
|
|
1341
|
+
const { splitButtonDropdownIsOpen, selectedItems, areAllSelected } = this.state;
|
|
1342
|
+
const numSelected = selectedItems.length;
|
|
1343
|
+
const allSelected = areAllSelected;
|
|
1344
|
+
const anySelected = numSelected > 0;
|
|
1345
|
+
const someChecked = anySelected ? null : false;
|
|
1346
|
+
const isChecked = allSelected ? true : someChecked;
|
|
1347
|
+
const splitButtonDropdownItems = [
|
|
1348
|
+
<DropdownItem key="item-1" onClick={this.selectNone}>
|
|
1349
|
+
Select none (0 items)
|
|
1350
|
+
</DropdownItem>,
|
|
1351
|
+
<DropdownItem key="item-2" onClick={this.selectPage}>
|
|
1352
|
+
Select page ({this.state.res.length} items)
|
|
1353
|
+
</DropdownItem>,
|
|
1354
|
+
<DropdownItem key="item-3" onClick={this.selectAll}>
|
|
1355
|
+
Select all ({this.state.totalItemCount} items)
|
|
1356
|
+
</DropdownItem>
|
|
1357
|
+
];
|
|
1358
|
+
|
|
1359
|
+
return (
|
|
1360
|
+
<Dropdown
|
|
1361
|
+
position={DropdownPosition.left}
|
|
1362
|
+
onSelect={this.onSplitButtonSelect}
|
|
1363
|
+
toggle={
|
|
1364
|
+
<DropdownToggle
|
|
1365
|
+
splitButtonItems={[
|
|
1366
|
+
<DropdownToggleCheckbox
|
|
1367
|
+
id="example-checkbox-2"
|
|
1368
|
+
key="split-checkbox"
|
|
1369
|
+
aria-label={anySelected ? 'Deselect all' : 'Select all'}
|
|
1370
|
+
isChecked={areAllSelected}
|
|
1371
|
+
onClick={this.splitCheckboxSelectAll}
|
|
1372
|
+
></DropdownToggleCheckbox>
|
|
1373
|
+
]}
|
|
1374
|
+
onToggle={this.onSplitButtonToggle}
|
|
1375
|
+
>
|
|
1376
|
+
{numSelected !== 0 && (
|
|
1377
|
+
<React.Fragment>{allSelected ? this.state.totalItemCount : numSelected} selected</React.Fragment>
|
|
1378
|
+
)}
|
|
1379
|
+
</DropdownToggle>
|
|
1380
|
+
}
|
|
1381
|
+
isOpen={splitButtonDropdownIsOpen}
|
|
1382
|
+
dropdownItems={splitButtonDropdownItems}
|
|
1383
|
+
/>
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1200
1387
|
render() {
|
|
1201
1388
|
const {
|
|
1202
1389
|
isDrawerExpanded,
|
|
1390
|
+
isChecked,
|
|
1391
|
+
selectedItems,
|
|
1203
1392
|
activeCard,
|
|
1204
|
-
isUpperToolbarDropdownOpen,
|
|
1205
|
-
isLowerToolbarDropdownOpen,
|
|
1206
|
-
isUpperToolbarKebabDropdownOpen,
|
|
1207
1393
|
isLowerToolbarKebabDropdownOpen,
|
|
1208
|
-
isCardKebabDropdownOpen,
|
|
1209
|
-
activeItem,
|
|
1210
1394
|
filters,
|
|
1211
1395
|
res
|
|
1212
1396
|
} = this.state;
|
|
@@ -1231,35 +1415,30 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1231
1415
|
|
|
1232
1416
|
const toolbarItems = (
|
|
1233
1417
|
<React.Fragment>
|
|
1234
|
-
<ToolbarItem
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
/>
|
|
1252
|
-
</OverflowMenuControl>
|
|
1253
|
-
</OverflowMenu>
|
|
1418
|
+
<ToolbarItem>{this.buildSelectDropdown()}</ToolbarItem>
|
|
1419
|
+
<ToolbarItem>
|
|
1420
|
+
<Button variant="primary">Create instance</Button>
|
|
1421
|
+
</ToolbarItem>
|
|
1422
|
+
<ToolbarItem>
|
|
1423
|
+
<Button variant="secondary">Action</Button>
|
|
1424
|
+
</ToolbarItem>
|
|
1425
|
+
<ToolbarItem hasAdditionalOptions>
|
|
1426
|
+
<Dropdown
|
|
1427
|
+
onSelect={this.onToolbarKebabDropdownSelect}
|
|
1428
|
+
toggle={<KebabToggle onToggle={this.onToolbarKebabDropdownToggle} id="card-view-data-toolbar-dropdown" />}
|
|
1429
|
+
isOpen={isLowerToolbarKebabDropdownOpen}
|
|
1430
|
+
isPlain
|
|
1431
|
+
dropdownItems={toolbarKebabDropdownItems}
|
|
1432
|
+
isFlipEnabled
|
|
1433
|
+
menuAppendTo="parent"
|
|
1434
|
+
/>
|
|
1254
1435
|
</ToolbarItem>
|
|
1255
1436
|
</React.Fragment>
|
|
1256
1437
|
);
|
|
1257
1438
|
|
|
1258
1439
|
const filtered =
|
|
1259
1440
|
filters.products.length > 0
|
|
1260
|
-
? res.filter(card =>
|
|
1261
|
-
return filters.products.length === 0 || filters.products.includes(card.name);
|
|
1262
|
-
})
|
|
1441
|
+
? res.filter(card => filters.products.length === 0 || filters.products.includes(card.name))
|
|
1263
1442
|
: res;
|
|
1264
1443
|
|
|
1265
1444
|
const icons = {
|
|
@@ -1276,27 +1455,54 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1276
1455
|
};
|
|
1277
1456
|
|
|
1278
1457
|
const drawerContent = (
|
|
1279
|
-
<Gallery hasGutter role=
|
|
1458
|
+
<Gallery hasGutter role="region" aria-label="Selectable card container">
|
|
1280
1459
|
{filtered.map((product, key) => (
|
|
1281
|
-
<
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
>
|
|
1293
|
-
<
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1460
|
+
<Card
|
|
1461
|
+
isHoverable
|
|
1462
|
+
key={product.name}
|
|
1463
|
+
id={'card-view-' + key}
|
|
1464
|
+
onKeyDown={this.onKeyDown}
|
|
1465
|
+
onClick={this.onCardClick}
|
|
1466
|
+
onSelectableInputChange={this.onChange}
|
|
1467
|
+
isSelectableRaised
|
|
1468
|
+
isSelected={activeCard === 'card-view-' + key}
|
|
1469
|
+
hasSelectableInput
|
|
1470
|
+
>
|
|
1471
|
+
<CardHeader>
|
|
1472
|
+
<img src={icons[product.icon]} alt={`${product.name} icon`} style={{ height: '50px' }} />
|
|
1473
|
+
<CardActions>
|
|
1474
|
+
<Dropdown
|
|
1475
|
+
isPlain
|
|
1476
|
+
position="right"
|
|
1477
|
+
onSelect={e => this.onCardKebabDropdownSelect(key, e)}
|
|
1478
|
+
toggle={
|
|
1479
|
+
<KebabToggle
|
|
1480
|
+
onToggle={(isCardKebabDropdownOpen, event) =>
|
|
1481
|
+
this.onCardKebabDropdownToggle(event, key, isCardKebabDropdownOpen)
|
|
1482
|
+
}
|
|
1483
|
+
/>
|
|
1484
|
+
}
|
|
1485
|
+
isOpen={this.state[key]}
|
|
1486
|
+
dropdownItems={[
|
|
1487
|
+
<DropdownItem key="trash" onClick={e => this.deleteItem(e, product)} position="right">
|
|
1488
|
+
<TrashIcon />
|
|
1489
|
+
Delete
|
|
1490
|
+
</DropdownItem>
|
|
1491
|
+
]}
|
|
1492
|
+
/>
|
|
1493
|
+
<Checkbox
|
|
1494
|
+
checked={isChecked}
|
|
1495
|
+
onClick={event => this.onCheckboxClick(event, product.id)}
|
|
1496
|
+
value={product.id}
|
|
1497
|
+
isChecked={selectedItems.includes(product.id)}
|
|
1498
|
+
aria-label="card checkbox example"
|
|
1499
|
+
id={`check-${product.id}`}
|
|
1500
|
+
/>
|
|
1501
|
+
</CardActions>
|
|
1502
|
+
</CardHeader>
|
|
1503
|
+
<CardTitle>{product.name}</CardTitle>
|
|
1504
|
+
<CardBody>{product.description}</CardBody>
|
|
1505
|
+
</Card>
|
|
1300
1506
|
))}
|
|
1301
1507
|
</Gallery>
|
|
1302
1508
|
);
|
|
@@ -1321,10 +1527,10 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1321
1527
|
</p>
|
|
1322
1528
|
</FlexItem>
|
|
1323
1529
|
<FlexItem>
|
|
1324
|
-
<Progress value={activeCard * 10} title="Title" />
|
|
1530
|
+
<Progress value={activeCard && activeCard.charAt(activeCard.length - 1) * 10} title="Title" />
|
|
1325
1531
|
</FlexItem>
|
|
1326
1532
|
<FlexItem>
|
|
1327
|
-
<Progress value={activeCard * 5} title="Title" />
|
|
1533
|
+
<Progress value={activeCard && activeCard.charAt(activeCard.length - 1) * 5} title="Title" />
|
|
1328
1534
|
</FlexItem>
|
|
1329
1535
|
</Flex>
|
|
1330
1536
|
</DrawerPanelBody>
|