Open jsinhSolanki opened 5 years ago
the same question
@jsinhSolanki, my issue is similar of yours. I didn't found out how to access the perfect-scroll instance through vue-perfect-scroll to update it. If the component allow to access the instance directly or offering the methods of it, it would be easy to call the method destroy or update(in my case) to that: https://github.com/mdbootstrap/perfect-scrollbar#how-to-use
Edit: Reading the component, it is particularly easy to do that:
It is just passing a ref to the component like
<perfect-scroll ref="scrollbar"></perfect-scrollbar>
and in the code access it using:
this.$refs.scrollbar.reset(); // to reset
this.$refs.scrollbar.update() //to update
this.$refs.scrollbar.ps //to access the instance of the perfect-scrollbar
Hey, I have swtich to destroy perfect scrollbar. But I can not figure I out how can I implement this where I want to disable perfect scrollbar if switch's value is true and restore scrollbar if value is false.