vue-match-heights icon indicating copy to clipboard operation
vue-match-heights copied to clipboard

v-for and match heights

Open kamilmaliszewski opened this issue 6 years ago • 3 comments

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 ?

kamilmaliszewski avatar Apr 06 '18 12:04 kamilmaliszewski

btw, document.dispatchEvent(new CustomEvent('matchheight', {})) it works for me. In this way you can trigger match height from any place in code

kamilmaliszewski avatar May 10 '18 07:05 kamilmaliszewski

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.

jrpersico avatar Apr 15 '20 16:04 jrpersico

adding a timeout worked for me

mounted() { setTimeout(() => { document.dispatchEvent(new CustomEvent('matchheight', {})); }, 200); }

aruspeter-octopus avatar May 04 '21 08:05 aruspeter-octopus