vue-mugen-scroll
vue-mugen-scroll copied to clipboard
Not working well with Quasar layouts?
I'm trying to use this component with Quasar layouts. Minimal example:
<template>
<q-layout>
<div class="layout-view">
<mugen-scroll :handler="fetchData">
loading...
</mugen-scroll>
</div>
</q-layout>
</template>
Results in this error:
[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'addEventListener' of undefined"
found in
---> <MugenScroll>
<QLayout>
<Index> at /Users/pignatelli/src/test/infinite-test/src/components/Index.vue
<App> at /Users/pignatelli/src/test/infinite-test/src/App.vue
<Root>
Commenting out <q-layout></q-layout> eliminates the error.
Any idea how to fix this?
Hmm, seems window is undefined in your app? I just tried myself with your example and the default template of Quasar, it worked fine 😅 Would you mind providing a repo to reproduce this?
Thanks for the quick reply! That's strange, I'm testing in the default Quasar template. I've just pushed my version: https://github.com/emepyc/infinite-test
The only changes I've made are to Index.vue: https://github.com/emepyc/infinite-test/blob/master/src/components/Index.vue
Have you been able to replicate the issue? If it is working for you, could you please share a repo with the example so I can take a look?
Just tried your example, no changes, no errors
