Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/main/src/TableGrowing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
TABLE_MORE,
TABLE_MORE_DESCRIPTION,
} from "./generated/i18n/i18n-defaults.js";
import { findVerticalScrollContainer } from "./TableUtils.js";

// The documentation should be similar to the Table.ts class documentation!
// Please only use that style where it uses markdown and the documentation is more readable.
Expand Down Expand Up @@ -225,7 +226,10 @@ class TableGrowing extends UI5Element implements ITableGrowing {
*/
_getIntersectionObserver(): IntersectionObserver {
if (!this._observer) {
this._observer = new IntersectionObserver(this._onIntersection.bind(this), { root: document });
this._observer = new IntersectionObserver(this._onIntersection.bind(this), {
root: findVerticalScrollContainer(this._table ?? document.body),
rootMargin: "5px",
});
}
return this._observer;
}
Expand Down