@enact/ui 4.9.3 → 4.9.5
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 +12 -0
- package/VirtualList/VirtualListBasic.js +1 -6
- package/package.json +2 -2
- package/useScroll/useScroll.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
The following is a curated list of changes in the Enact ui module, newest changes on the top.
|
|
4
4
|
|
|
5
|
+
## [4.9.5] - 2024-12-11
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `ui/VirtualList` to not abnormally scroll when `dataSize` and `itemSizes` changed
|
|
10
|
+
|
|
11
|
+
## [4.9.4] - 2024-11-19
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `ui/VirtualList` to re-render when the each size of variable sized items changed
|
|
16
|
+
|
|
5
17
|
## [4.9.3] - 2024-10-29
|
|
6
18
|
|
|
7
19
|
No significant changes.
|
|
@@ -387,7 +387,6 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
387
387
|
}, {
|
|
388
388
|
key: "componentDidUpdate",
|
|
389
389
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
390
|
-
var _prevProps$itemSizes, _this$props$itemSizes;
|
|
391
390
|
var deferScrollTo = false;
|
|
392
391
|
var _this$state = this.state,
|
|
393
392
|
firstIndex = _this$state.firstIndex,
|
|
@@ -442,11 +441,7 @@ var VirtualListBasic = exports.VirtualListBasic = /*#__PURE__*/function (_Compon
|
|
|
442
441
|
this.indexToScrollIntoView = -1;
|
|
443
442
|
}
|
|
444
443
|
}
|
|
445
|
-
if (prevProps.direction !== this.props.direction || prevProps.overhang !== this.props.overhang || prevProps.spacing !== this.props.spacing || !(0, _equals["default"])(prevProps.itemSize, this.props.itemSize) ||
|
|
446
|
-
return acc + cur;
|
|
447
|
-
}, 0)) !== ((_this$props$itemSizes = this.props.itemSizes) === null || _this$props$itemSizes === void 0 ? void 0 : _this$props$itemSizes.reduce(function (acc, cur) {
|
|
448
|
-
return acc + cur;
|
|
449
|
-
}, 0))) {
|
|
444
|
+
if (prevProps.direction !== this.props.direction || prevProps.overhang !== this.props.overhang || prevProps.spacing !== this.props.spacing || !(0, _equals["default"])(prevProps.itemSize, this.props.itemSize) || !this.hasDataSizeChanged && !(0, _util.shallowEqual)(prevProps.itemSizes, this.props.itemSizes)) {
|
|
450
445
|
var _this$getXY = this.getXY(this.scrollPosition, 0),
|
|
451
446
|
x = _this$getXY.x,
|
|
452
447
|
y = _this$getXY.y;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.5",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@enact/core": "^4.9.
|
|
35
|
+
"@enact/core": "^4.9.5",
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
37
|
"direction": "^1.0.4",
|
|
38
38
|
"invariant": "^2.2.4",
|
package/useScroll/useScroll.js
CHANGED
|
@@ -156,6 +156,7 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
|
|
|
156
156
|
delete rest.onScrollStart;
|
|
157
157
|
delete rest.onScrollStop;
|
|
158
158
|
delete rest.onWheel;
|
|
159
|
+
delete rest.preventScroll; // scrollMode 'native'
|
|
159
160
|
delete rest.removeEventListeners;
|
|
160
161
|
delete rest.scrollStopOnScroll; // scrollMode 'native'
|
|
161
162
|
delete rest.scrollTo;
|
|
@@ -815,6 +816,8 @@ var useScrollBase = exports.useScrollBase = function useScrollBase(props) {
|
|
|
815
816
|
scrollByPage(ev.keyCode);
|
|
816
817
|
}
|
|
817
818
|
} else {
|
|
819
|
+
var _props$preventScroll;
|
|
820
|
+
(_props$preventScroll = props.preventScroll) === null || _props$preventScroll === void 0 || _props$preventScroll.call(props, ev);
|
|
818
821
|
(0, _handle.forward)('onKeyDown', ev, props);
|
|
819
822
|
}
|
|
820
823
|
}
|