In my created() area I have a call to Firestore that fills a array I’ve setup in my data area named ebscoCachedSearchesController
. It is an array of objects and I have the objects set properly to show in the qselect. When the select shows it displays as if an option has already been selected and that is [object Object]
. However! When I click on the select I see all the options I expect to see and can click them and everything from that point works as desired.
How to I get rid of [object Object] and have the qselect be in its base state until I click on it?
<q-card-section>
<template v-if="ebscoCachedSearchesController.length > 0">
<q-select
dark
:options="ebscoCachedSearchesController"
v-model="ebscoTemp"
filled
label="Cached Search to Use"
>
</q-select
>
</template>
</q-card-section>
In created():
this.$firestore.collection("ebsco-searches").onSnapshot(querySnapshot => {
this.ebscoCachedSearchesController = [];
querySnapshot.forEach(doc => {
let rObj = {};
rObj.name = doc.data().searchTerm;
rObj.label = doc.data().searchTerm;
rObj.value = doc.data().searchTerm;
rObj.id = doc.id;
rObj.selected = false;
this.ebscoCachedSearchesController.push(rObj);
this.ebsco_a9h_loading = false;
});
I’ve been digging a while and I just can’t figure it out. Thanks a lot for any help.