I'm currently working on populating a select box in Vuetify by retrieving data through an ajax call. I'm struggling to figure out how to populate the select box with this data. The ajax call is successful and I receive an array of objects which I assign to the 'items' variable. Here is my attempted code:
v-select
<v-select
:items="items"
item-text="test"
v-model="client"
label="Choose a Client"
class="input-group--focused"
item-value="text"
></v-select>
Get Client Function
getClient: function (items) {
axios.get('http://127.0.0.1:8000/client/')
.then(function (response, items) {
console.log(response.data);
items = response.data;
})
.catch(function (error) {
console.log(error);
});
}
Call Function
created() {
this.getClient(this.items);
}