Open alexcroox opened 3 years ago
When using this plugin I have to wrap my functions in the same throttle code every time to stop them firing too often:
import throttle from 'lodash.throttle' methods: { onResize: throttle( function ({ width, height }) { // Logic }, 1000, { trailing: true } ) }
It would be great if this could be part of the initial config (optionally of course)
Vue.use(VueResizeObserver, { throttle: { waitMs: 1000, trailing: true } })
More config options: https://lodash.com/docs/4.17.15#throttle
When using this plugin I have to wrap my functions in the same throttle code every time to stop them firing too often:
It would be great if this could be part of the initial config (optionally of course)
More config options: https://lodash.com/docs/4.17.15#throttle