David-Desmaisons / Vue.resize

Vue directive to detect resize events with deboucing and throttling capacity.
MIT License
326 stars 36 forks source link

[wish] add an "initial" modifier to the directive to fire always at mount #6

Closed nahuel closed 6 years ago

nahuel commented 6 years ago

It will be very useful to make the resize event fire at least one time, right after the element is mounted on the DOM. Maybe adding a modifier like <div v-resize:initial="onResize">. This is already implemented on this library: https://github.com/FranckFreiburger/vue-resize-sensor#initial-boolean

David-Desmaisons commented 6 years ago

Hello @nahuel , you can use the vue mounted method for this purpose. I do not see this feature as generic enought .

David-Desmaisons commented 6 years ago

I end up providing this feature in version 1.1.0