VueJS Errors before API load

0

Is there any way I can ask VueJS to wait for a while before handling DOM errors?

I have for example a select which receives a v-model from the API, but since VueJS loads the DOM first before the call http , it already accuses error in select

  

type check failed for prop "options". Expected Array, got Undefined.

This error is correct because it draws the DOM with nothing in the select, but then fills it with my API call. Is there a way to ask VueJS to wait for me to fetch the data from the API and then it checks the DOM ?

Thank you !!

@Edit

.Vue

    <vue-select track-by="Value" v-model="data.nome" label="Name" :options="data.nomeList"></vue-select>

data(){
   data: {}
}

.Js

axios.get('url.com').then(response => {
     this.data= response.data;
})
    
asked by anonymous 28.11.2017 / 13:04

0 answers