dalphyx / vue-headroom

Headroom for Vuejs
128 stars 16 forks source link

Change the offset on resize #21

Open leandromatos opened 5 years ago

leandromatos commented 5 years ago

It's possible to set new value of offset on window resize?

I try change props offset when window is resize, but the vue-headroom not recognized the new value of offset.

joernroeder commented 5 years ago

running into the same issue as my header height changes between breakpoints. registering event listeners and debouncing this._setHeightOffset() should do it.

https://github.com/vuejs/vue/issues/1915#issuecomment-280014651 https://medium.com/vuejs-tips/tiny-debounce-for-vue-js-cea7a1513728