vue3-perfect-scrollbar icon indicating copy to clipboard operation
vue3-perfect-scrollbar copied to clipboard

Scroll does not hide after decreasing container height

Open KatyaV97 opened this issue 1 year ago • 6 comments

I set the property to class ps: max-height: 130px When the height of the inner container exceeds 130px a scroll appears. But when the height of the inner container dynamically decreases and becomes less than 130px, the scroll does not disappear. Scroll disappears only after scrolling the mouse wheel, although there is no scrolling

KatyaV97 avatar Apr 16 '24 05:04 KatyaV97

@KatyaV97 I have the same issue, did you find any solutions for this ?

vishnu-exerp avatar Jun 19 '24 17:06 vishnu-exerp

Did you try to call ps.update()?

florianjea avatar Jun 19 '24 18:06 florianjea

@florianjea Nop, i just added a key field to perfect scrollbar component which affects the container height. So its fixed now :)

like this

<perfect-scrollbar
        :options="{
          swipeEasing: true,
          wheelPropagation: true,
        }"
        :key="searchText"
        class="flex-1 text-sm"
      >

so when the searchText changes and update the results it updates the scroll view now.

vishnu-exerp avatar Jun 19 '24 18:06 vishnu-exerp

@florianjea Nop, i just added a key field to perfect scrollbar component which affects the container height. So its fixed now :)

like this

<perfect-scrollbar
        :options="{
          swipeEasing: true,
          wheelPropagation: true,
        }"
        :key="searchText"
        class="flex-1 text-sm"
      >

so when the searchText changes and update the results it updates the scroll view now.

searchText is a ref of the container?

florianjea avatar Jun 20 '24 07:06 florianjea

@florianjea Nop, searchText is the v-modal of the search input. So it will change when i try to filter the list by name.

vishnu-exerp avatar Jun 20 '24 09:06 vishnu-exerp

@vishnu-exerp thank you! It helped me

KatyaV97 avatar Jul 19 '24 06:07 KatyaV97