I have a multi select v-autocomplete component from vuetify.js and the items are an array that get used in the multi select dropdown
The defendantCodeOptions items look like this
{text: "some text", value: 36}
I can't seem to figure out how to select items in javascript that are returned from a ajax call.
<v-autocomplete
v-model = "defendantCode"
label = "Defendant Code"
:items = "defendantCodeOptions"
:loading = "defendantCodeIsLoading"
:filter = "customFilter"
clearable
multiple
dense >
</v-autocomplete>
ex. I want to loop through each item from a ajax calls response like this below and set each checked values in the dropdown to the ones that match the values from the server. But this below isn't working!
// returned values from ajax call
what I want is something like this
for (var i = 0; i < all items; i++) {
// if the value of this item exists in any of the returned values, check it
}
I want it to look like this using code behind and NOT the UI