Open santhanakrishnanstark opened 1 year ago
The problem is the eventHub
in the code. This emits global events to all subscriber.
E.g.
eventHub.$on('$InfiniteLoading:loaded', () => { ... }
should be:
eventHub.$on('$InfiniteLoading:loaded', (ev) => {
if (!ev || ev.target !== this) return;
...
});
Same changes for:
eventHub.$on('$InfiniteLoading:complete', () => { ... }
eventHub.$on('$InfiniteLoading:reset', () => { ... }
Version
3.0.0-alpha.0-0
Vue.js version
3.2
Reproduction Link
You can check the issue here - https://stackblitz.com/edit/vue-ckn2zu?file=src%2FApp.vue
Steps to reproduce
What is Expected?
Each infinite loading component should run separately with its own set of data.
What is actually happening?
if one component doesn't have the data then other component also showing 'no data available ' error.