vue-match-heights
vue-match-heights copied to clipboard
v-for and match heights
Hi ! Sometimes when I change the number of items in my v-for loop via ajax there is the problem with heights. After resize it is again fine.
There is any possiblity to trigger this match heights methods from JS code? E.g in axios response?
this.items = reponse.data['items']
this.$matchHeight.trigger ?
btw, document.dispatchEvent(new CustomEvent('matchheight', {}))
it works for me. In this way you can trigger match height from any place in code
Hi @kamilmaliszewski,
When I use vue-match-heights with v-for, it applies the height of my first element to the others.
How to run it once the v-for has been rendered?
I use it in bootstrap-vue carousel.
adding a timeout worked for me
mounted() { setTimeout(() => { document.dispatchEvent(new CustomEvent('matchheight', {})); }, 200); }