Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

v-for and match heights #2

Open
kamilmaliszewski opened this issue Apr 6, 2018 · 3 comments
Open

v-for and match heights #2

kamilmaliszewski opened this issue Apr 6, 2018 · 3 comments

Comments

@kamilmaliszewski
Copy link

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
Copy link
Author

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

@jrpersico
Copy link

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.

@aruspeter-octopus
Copy link

adding a timeout worked for me

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants