MCPcopy Create free account
hub / github.com/UI5/webcomponents / _getIntersectionObserver

Method _getIntersectionObserver

packages/main/src/TableGrowing.ts:225–233  ·  view source on GitHub ↗

* Returns the IntersectionObserver instance. If it does not exist, it will be created. * The observer will call the loadMore function when the end of the table is reached. * @private

()

Source from the content-addressed store, hash-verified

223 * @private
224 */
225 _getIntersectionObserver(): IntersectionObserver {
226 if (!this._observer) {
227 this._observer = new IntersectionObserver(this._onIntersection.bind(this), {
228 root: findVerticalScrollContainer(this._table ?? document.body),
229 rootMargin: "5px",
230 });
231 }
232 return this._observer;
233 }
234
235 _onIntersection(entries: Array<IntersectionObserverEntry>) {
236 if (entries.some(entry => entry.isIntersecting)) {

Callers 1

_observeTableEndMethod · 0.95

Calls 1

Tested by

no test coverage detected