infinite-ajax-scroll icon indicating copy to clipboard operation
infinite-ajax-scroll copied to clipboard

Using scrollcontainer creates Js error on unbind

Open scarl555 opened this issue 2 years ago • 0 comments

Hi, I using the infinite scoll as endless-scoll for an table with filters. It was working perfekt until now, when I restructure my HTML. No I need to set the scrollcontainer property for the endless-scoll. When I was select a filter, than I get an error:

NativeWrapperResizeObserver.prototype.unobserve = function unobserve () { this.ro.unobserve(); };

infinite-ajax-scroll.es.js:783 Uncaught TypeError: Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present. at NativeWrapperResizeObserver.unobserve (infinite-ajax-scroll.es.js:783:1)

I look into the ResizeObserver Documentation https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/unobserve The unobserve method needs a target parameter like the observe method.

this.ro.unobserve(this.el); Is the fix, than the unobserve works https://github.com/webcreate/infinite-ajax-scroll/blame/a466bbc4ca09b8f0d2cca3163eb84e623e34c429/src/resize-observer.js#L35

Greetings Simon

scarl555 avatar Nov 24 '23 12:11 scarl555