I'm trying to render some Element UI checkboxes from an array of strings that I'm getting from the server.
<el-form-item
label="Predefined Labels"
>
// added this div because I wanted to see if I can render correctly using other component
<div
v-for="label in predefinedLabels"
:key="label"
>
{{ label }}
</div>
<el-checkbox-group
v-model="userForm.profile.labels"
size="medium"
>
<el-checkbox-button
v-for="label in predefinedLabels"
:key="label"
:label="label"
>
{{ label }}
</el-checkbox-button>
</el-checkbox-group>
</el-form-item>
Using this code, I am rendering the predefinedLabels with the div but not with the checkbox button.
I'm getting the following error:
https://i.stack.imgur.com/6Flha.png
How can I have a length error about my list when I've already rendered it and seen that it is present and has elements, and, implicitly, length?
I added some comments to the code.