[Vuejs]-VueJS slots with v-for loop do not display proper elements

0👍

Thanks to @SteveHolgado I found the answer: had to add :key attribute in the parent v-for and wrap each slot in the child in its own div:

<template>
    <div>
        <div v-for="ctr in maxItems">
            <slot :name="'s-' + (ctr + startItem - 1)"></slot>
        </div>
    </div>
</template>

Leave a comment