vue-keep-scroll-position icon indicating copy to clipboard operation
vue-keep-scroll-position copied to clipboard

scroll event listener never called

Open daviesdoclc opened this issue 7 years ago • 2 comments

Hi. This plugin is exactly what I need. However, I don't ever see the scroll event listener get called when I scroll in my component. I put logging into index.js. My router looks like this

<keep-alive> <router-view v-keep-scroll-position></router-view> </keep-alive>

Ideas?

daviesdoclc avatar Dec 07 '18 15:12 daviesdoclc

Oh! If I put it on the component itself it seems to work. Just not at the router level.

daviesdoclc avatar Dec 07 '18 15:12 daviesdoclc

Also, I need to declare s .d.ts file with this

declare module "vue-keep-scroll-position"

otherwise I was getting a complaint that

Could not find a declaration file for module 'vue-keep-scroll-position'. '/Users/daviesd/workspace/mobile/app/node_modules/vue-keep-scroll-position/index.js' implicitly has an 'any' type. Try npm install @types/vue-keep-scroll-position if it exists or add a new declaration (.d.ts) file containing declare module 'vue-keep-scroll-position'; [7016] module "/Users/daviesd/workspace/mobile/app/node_modules/vue-keep-scroll-position/index"

daviesdoclc avatar Dec 07 '18 15:12 daviesdoclc