Skip to content

Commit

Permalink
[VirtualList]: fixed estimatedHeight calculations in components with …
Browse files Browse the repository at this point in the history
…pagination
  • Loading branch information
siarhei-epam committed Oct 23, 2024
1 parent 48060b7 commit 516d32b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**What's New**
* [TabButton][VerticalTabButton]: decreased paddings, added gaps `3px` between internal items for all sizes according to design
* [Tag]: changed layout - added gaps between internal items, changed padding
* [VirtualList]: fixed estimatedHeight calculations in components with pagination


# 5.10.2 - xx.xx.2024
Expand Down
2 changes: 2 additions & 0 deletions uui-core/src/hooks/useVirtualList/useVirtualList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export function useVirtualList<List extends HTMLElement = any, ScrollContainer e
&& scrollContainer.current?.clientHeight !== prevScrollContainerClientHeight
) {
++scrollContainerHeightChangesCount.current;
} else {
scrollContainerHeightChangesCount.current = 0;
}
if (scrollContainerHeightChangesCount.current > 20 && !scrollContainerHeightIsNotLimited.current) {
scrollContainerHeightIsNotLimited.current = true;
Expand Down

0 comments on commit 516d32b

Please sign in to comment.