Skip to content

Commit

Permalink
WRR-2172: Fix VirtualList to update its scroll bounds when the tota…
Browse files Browse the repository at this point in the history
…l size of items is changed (#3275)

* WRR-2172: Fix VirtualListBasic to update scroll bounds when the total width of items is changed

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)

* Apply review

Enact-DCO-1.0-Signed-off-by: Juwon Jeong (juwon.jeong@lge.com)
  • Loading branch information
juwonjeong authored Sep 23, 2024
1 parent f8b9e56 commit 4454adb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following is a curated list of changes in the Enact ui module, newest change

- `ui/Marquee.MarqueeController` to start animation properly when `marqueeOnFocus` is set to `true` and text changed
- `ui/Scroller` and `ui/VirtualList` to have default prop when `undefined` prop is passed
- `ui/VirtualList` to update its scroll bounds when the total size of items is changed

## [4.9.0] - 2024-07-17

Expand Down
3 changes: 2 additions & 1 deletion packages/ui/VirtualList/VirtualListBasic.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ class VirtualListBasic extends Component {
prevProps.direction !== this.props.direction ||
prevProps.overhang !== this.props.overhang ||
prevProps.spacing !== this.props.spacing ||
!equals(prevProps.itemSize, this.props.itemSize)
!equals(prevProps.itemSize, this.props.itemSize) ||
prevProps.itemSizes?.reduce((acc, cur) => acc + cur, 0) !== this.props.itemSizes?.reduce((acc, cur) => acc + cur, 0)
) {
const {x, y} = this.getXY(this.scrollPosition, 0);

Expand Down

0 comments on commit 4454adb

Please sign in to comment.