Skip to content

Using scrollcontainer creates Js error on unbind #882

@scarl555

Description

@scarl555

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions