mercs600 / vue2-perfect-scrollbar

Vue.js wrapper for perfect scrollbar
https://mercs600.github.io/vue2-perfect-scrollbar/
MIT License
274 stars 43 forks source link

Scrolling div height is not updated if I remove an item #40

Closed jetlej closed 4 years ago

jetlej commented 4 years ago

See here: https://www.loom.com/share/b4c4e4da4cf1443fac1e9b59e348c33d

If there is an overflow, and I scroll to bottom and then delete an item, the list doesn't snap down to fill the blank. It only updates if I scroll up past where the blank space is.

mercs600 commented 4 years ago

Is your div has setup max-height or height ? The better way is just call update method when you know that after some actions container height may be changed.

Just setup reference <perfect-scrollbar ref="scroll">

And call update after some predicted changes this.$refs.scroll.update()

jetlej commented 4 years ago

That worked, thank you!