I've got basic select that I want bind to array. I use vuetify, but this problem is universal.
<v-select
v-bind:items="physicianListSpeciality"
>
</v-select>
now I want to use the same select to many arrays, depend on offer.person value that could be physician, nurse etc.
data: {
offer.person: "physician" //or offer.person: "nurse"
}
For example for physician I want to bind physicianListSpeciality
For nurse I want to bind nurseListSpeciality,
etc.
I tried to make something like:
<v-select
v-bind:items="`${offer.person}`ListSpeciality"
>
</v-select>
or
v-bind:items="[offer.person +'ListSpeciality']"
none of them seems to work for me. How should correct my code to make this work? Should I use some kind of computed or there is another way to do it?
[Vue warn]: Invalid prop: type check failed for prop "items". Expected Array, got String.