Skip to content

Commit

Permalink
WRR-12807: Fixed VirtualList to not abnormally scroll when `dataSiz…
Browse files Browse the repository at this point in the history
…e` and `itemSizes` changed (#3300)

* WRR-12807: Fixed `VirtualList` to not abnormally scroll when
`dataSize` and `itemSizes` changed

Enact-DCO-1.0-Signed-off-by: Mikyung Kim ([email protected])

* fix typo

Enact-DCO-1.0-Signed-off-by: Mikyung Kim ([email protected])
  • Loading branch information
MikyungKim authored Dec 6, 2024
1 parent dff9a46 commit bf7e012
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The following is a curated list of changes in the Enact ui module, newest changes on the top.

## [unreleased]

### Fixed

- `ui/VirtualList` to not abnormally scroll when `dataSize` and `itemSizes` changed

## [5.0.0-alpha.3] - 2024-12-02

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/VirtualList/VirtualListBasic.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class VirtualListBasic extends Component {
prevProps.overhang !== this.props.overhang ||
prevProps.spacing !== this.props.spacing ||
!equals(prevProps.itemSize, this.props.itemSize) ||
!shallowEqual(prevProps.itemSizes, this.props.itemSizes)
(!this.hasDataSizeChanged && !shallowEqual(prevProps.itemSizes, this.props.itemSizes))
) {
const {x, y} = this.getXY(this.scrollPosition, 0);

Expand Down

0 comments on commit bf7e012

Please sign in to comment.