I have a problem that seems simple but I can't find a solution.
I have a page with a select button and a chart. When I choose an option, updateGraph method is called. In this method, I change the data this.loading to display a spinner instead of the chart.
First problem: the spinner is not displayed. Second problem: the task being relatively long, the select button is also blocked (it is not closed).
I tried to use async/await but it doesn't change anything.
I don't know if that's possible or if I'm doing things the wrong way. Thank you in advance for your help and advice.
<v-select [...] @change="updateGraph"></v-select>
<v-row v-if="!processingDatas">
[...] No problem
<v-row v-else justify="center" class="pa-5">
<v-progress-circular
:size="70"
:width="7"
color="accent"
indeterminate
></v-progress-circular>
</v-row>
data() {
return {
processingDatas: false,
...
}
updateGraph() {
this.processingDatas = true
this.formatFlux().then(() => {
this.processingDatas = false
})
},
async formatFlux() {
[...]
// long task
// it takes few seconds
return await Promise.resolve()
},