Reaload component. Someone help me xDDD



  • Hello guys, I’m newbee at quasar framwork , and a have a problem, i want to make i list of good, with category, which you can change in the <select> , onchange value in the the select, i start ajax function, and cath the json response from server with data, and do this
    data () {
    return {
    flowers : []
    }
    }
    this.flowers = data

    in console a see, than data will send for client , but my page is change only after another activity…
    Do anyone know what i need to do? thnak you guys ^_^



  • @Dase23 it is pretty easy, if you follow the quasar documentation.

    1. Add the QSelect component and set up the event you want: <q-select v-model=“yourmodel” :options=“flowers” @change=“onchangeevent”></q-select>
    2. create a method to handle the onchange event, i.e: “onchangeevent(val){//do whatever you want, here you can call another function ajax to get some information from server once the selected value changes }”
    3. (optional)create a method to get data from server i.e: => “fetchData(){//here you can call the axios function}”

    Please remember that to avoid warnings, with the reactive property of QSelect you have to initialize the flowers array like this: flowers:[{label:’’, value:’’}]. So this looks like a quasar issue but can be handled with this workaround.

    Hope this can give you an idea, otherwhise you can contact me and I can share with you some code.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.