@stenajs-webui/grid 15.5.0 → 15.5.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
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v15.5.1 (Thu Apr 07 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Pass itemKey to renderProps in StandardTable [#449](https://github.com/StenaIT/stenajs-webui/pull/449) ([@mattias800](https://github.com/mattias800))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Mattias Andersson ([@mattias800](https://github.com/mattias800))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v15.4.0 (Mon Apr 04 2022)
|
|
2
14
|
|
|
3
15
|
#### 🚀 Enhancement
|
package/dist/index.es.js
CHANGED
|
@@ -1518,10 +1518,10 @@ var StandardTableCell = React.memo(function StandardTableCell(_a) {
|
|
|
1518
1518
|
var onKeyDownTable = useOnKeyDownContext();
|
|
1519
1519
|
var numNavigableColumns = useColumnIndexPerColumnIdContext().numNavigableColumns;
|
|
1520
1520
|
var stickyPropsPerColumnContext = useStickyPropsPerColumnContext();
|
|
1521
|
+
var itemKey = useMemo(function () { return keyResolver(item); }, [item, keyResolver]);
|
|
1521
1522
|
var isSelected = useMemo(function () {
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
}, [item, keyResolver, selectedIds]);
|
|
1523
|
+
return selectedIds.indexOf(itemKey) >= 0;
|
|
1524
|
+
}, [itemKey, selectedIds]);
|
|
1525
1525
|
var _d = useColumnConfigById(columnId), itemValueResolver = _d.itemValueResolver, itemLabelFormatter = _d.itemLabelFormatter, width = _d.width, minWidth = _d.minWidth, _e = _d.justifyContentCell, justifyContentCell = _e === void 0 ? "flex-start" : _e, borderLeft = _d.borderLeft, renderCell = _d.renderCell, gridCellOptionsForColumn = _d.gridCellOptions, isEditable = _d.isEditable, onChange = _d.onChange, onKeyDownCell = _d.onKeyDown, disableGridCell = _d.disableGridCell, disableGridCellFocus = _d.disableGridCellFocus, zIndex = _d.zIndex;
|
|
1526
1526
|
var itemValue = useMemo(function () {
|
|
1527
1527
|
if (itemValueResolver) {
|
|
@@ -1567,6 +1567,7 @@ var StandardTableCell = React.memo(function StandardTableCell(_a) {
|
|
|
1567
1567
|
isEditable: editable,
|
|
1568
1568
|
isSelected: isSelected,
|
|
1569
1569
|
zIndex: currentZIndex,
|
|
1570
|
+
itemKey: itemKey,
|
|
1570
1571
|
})) : (React.createElement(TextCell, { label: label }));
|
|
1571
1572
|
}, [
|
|
1572
1573
|
renderCell,
|
|
@@ -1577,6 +1578,7 @@ var StandardTableCell = React.memo(function StandardTableCell(_a) {
|
|
|
1577
1578
|
editable,
|
|
1578
1579
|
isSelected,
|
|
1579
1580
|
currentZIndex,
|
|
1581
|
+
itemKey,
|
|
1580
1582
|
]);
|
|
1581
1583
|
var activeBorderLeft = getCellBorder(borderFromGroup, disableBorderLeft, borderLeft);
|
|
1582
1584
|
var shadow = stickyProps.sticky &&
|