iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
83 stars 23 forks source link

Table: onBottomReached isn't getting called when the last data row is filtered out #523

Closed DziugasRam closed 2 years ago

DziugasRam commented 2 years ago

Describe the bug (actual behavior)

onBottomReached is only called when the row that displays the last data entry appears in the viewport, which never happens if the last row is filtered out. (The last row is being determined by its index being equal to unfiltered data's length https://github.com/iTwin/iTwinUI-react/blob/449dc4229c15b040e62395a4ab49592217e3bf13/src/core/Table/Table.tsx#L658, which doesn't work when filters are applied)

Expected behavior

onBottomReached should be called when the bottom of the table is reached, even when filters are applied.

veekeys commented 2 years ago

Hey @DziugasRam

This is fixed in @itwin/itwinui-react@1.35.0