Open johnsmith0209 opened 1 month ago
The observer is intended to observe only one element, which is the infinite-loading component itself; so entries length shouldn't be more than 1 element; https://github.com/oumoussa98/vue3-infinite-loading/blob/089119fcfe75d18d406737707fcddd5adc49326a/src/utils.ts#L42
however, it could also be caused by this issue #78 that has been fixed in the latest version;
I recommend upgrading to the latest version (1.3.2); If the problem persists, please provide a repro so we can further investigate;
v3-infinite-loading@1.2.2
I was caught on an issue: When the page was mounted, not every time the
@infinite
event was called.After I added
console.log
to the IntersectionObserver callback, I found that theentries
param was an array with 2 items.But the code shows that only first item of
entries
is used. Why ? https://github.com/oumoussa98/vue3-infinite-loading/blob/089119fcfe75d18d406737707fcddd5adc49326a/src/utils.ts#L34Shouldn't this code be like: