lmiller1990/v-switch-case

Not working properly in v-for loop

Opened this issue · 1 comments

Example:

<div v-for="question in poll">
    <div v-switch='question.answerField'>
        <div v-case="'radio'">Radio</div>
        <div v-default>Unknown</div>
    </div>
</div>

If question[0].answerField equals 'radio' and question[1].answerField equals'number' it thinks, that every answerField is 'number' and always outputs 'Unknown' (checks last object of array)

Hi! I did not have notifications on for this repo, sorry I missed this.

Hm interesting - I had not tried the v-for use case. I could look into this, if it's something you think is useful?