mercs600 / vue3-perfect-scrollbar

Vue.js wrapper for perfect scrollbar for version 3
140 stars 20 forks source link

How can I access suppressScrollY via $ref #23

Open olegopro opened 1 year ago

olegopro commented 1 year ago

Please tell me how you can get access to suppressScrollX via $ref.

I have a container in which a perfect scrollbar is connected, and there is a modal window on top of this container. When I open a modal window in which there is a list with a scroll (standard browser-based), the container in which the perfect scrollbar is connected also scrolls.

As a temporary solution I did this.$refs.previewСontainer.$el.classList.remove('ps') this.$refs.previewСontainer.$el.classList.add('ps')

That is, when I have a modal window open, I just remove the .ps class from the container.

Can I somehow connect via this.$refs.previewСontainer to the suppressScrollX option to make it true or false