I attempted using @change
and watch
with no success. How can I detect when the select value is changed?
This is the code snippet I am working with:
<select v-model="selected" @change="changeLang()" >
<option v-for="item in langList" :key="item.text" :value="item.lang">
{{ item.text }}
</option>
</select>
function changeLang()
{
console.log("Called>>>>");
}
watch(() => selected, (first, second) => {
console.log(
"Watch props.selected function called with args:",
first,
second
);
});