slider
slider copied to clipboard
@change event comes before underlying model has been changed
In a Vue3 app I need to modify a value in an object based on slider change. I get the event, read the v-model and find the old value while in the event handler. If I add a slight delay, like 100ms, the v-model object gets updated and also reflects the change slider value.
same is use in template variable, i have a lags
I have worked around this using nextTick.
async function update() {
await nextTick();
console.log(range.value);
};