Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using scrollcontainer creates Js error on unbind #882

Open
scarl555 opened this issue Nov 24, 2023 · 0 comments
Open

Using scrollcontainer creates Js error on unbind #882

scarl555 opened this issue Nov 24, 2023 · 0 comments

Comments

@scarl555
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant