@itwin/itwinui-react 2.4.2 → 2.4.3
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
|
@@ -263,6 +263,10 @@ const useVirtualization = (props) => {
|
|
|
263
263
|
indexDiff * childHeight.current.middle
|
|
264
264
|
: scrollToIndex * childHeight.current.middle,
|
|
265
265
|
});
|
|
266
|
+
// update visible index
|
|
267
|
+
const start = getNumberOfNodesInHeight(childHeight.current.middle, Math.round(scrollableContainer.scrollTop));
|
|
268
|
+
const visibleNodes = getVisibleNodeCount(childHeight.current.middle, start, itemsLength, scrollableContainer);
|
|
269
|
+
visibleIndex.current = { start: start, end: start + visibleNodes };
|
|
266
270
|
}
|
|
267
271
|
// if `scrollToIndex` is the first visible node
|
|
268
272
|
// ensure it is fully visible
|
|
@@ -234,6 +234,10 @@ export const useVirtualization = (props) => {
|
|
|
234
234
|
indexDiff * childHeight.current.middle
|
|
235
235
|
: scrollToIndex * childHeight.current.middle,
|
|
236
236
|
});
|
|
237
|
+
// update visible index
|
|
238
|
+
const start = getNumberOfNodesInHeight(childHeight.current.middle, Math.round(scrollableContainer.scrollTop));
|
|
239
|
+
const visibleNodes = getVisibleNodeCount(childHeight.current.middle, start, itemsLength, scrollableContainer);
|
|
240
|
+
visibleIndex.current = { start: start, end: start + visibleNodes };
|
|
237
241
|
}
|
|
238
242
|
// if `scrollToIndex` is the first visible node
|
|
239
243
|
// ensure it is fully visible
|