Within the structure of a Vue component's template, I have the following code:
<td>
<select id="papel" @change="intervChange(row)">
<option value="Apreciador">Apreciar</option>
<option value="Assessor">Assessorar</option>
<option value="Comunicador">Comunicar</option>
<option value="Decisor">Decidir</option>
<option value="Executor">Executar</option>
<option value="Iniciador">Iniciar</option>
</select>
</td>
Upon trying to access the selectedIndex property of the select element within intervChange function, it consistently returns a value of 0.
methods: {
intervChange: function(data){
var i = document.getElementById("papel");
console.log(i.selectedIndex);
var typeInterv = i.options[i.selectedIndex].value;
console.log(typeInterv)
},
What might be causing this issue in my implementation?