I would like to have a select with several levels
I wanted to use <optgroup> but this one cannot be selected so I found a solution on another post, put <option> by adding a space at the beginning to make the different levels.
<select>
<option>select me</option>
<option> me indented</option>
<option> even more indentation</option>
</select>
Except I have to do it dynamically using a v-for.
<select v-model="form.contact.object" id="object">
<option disabled value="null">Default text</option>
<div v-for="(obj, i) in list" :key="i" :value="i">
<option>{{ obj.list.label }}</option>
<option v-for="(child, j) in obj.listChildren" :key="j" :value="j"> {{ child.list.label }}</option>
</div>
</select>
So I tried to use a div for my first loop but it doesn't work. The goal is to make a first for to retrieve the parent then a second for to retrieve the children