So how would I do this? Basically I have a list of patients in the firestore. I want to read from the list of patients and populate them into something on the website. But I'm unsure of how to do so.
<v-autocomplete
:items="patients"
:filter="customFilter"
color="blue"
v-model="selectedPatient"
label="Select a patient to send report to"
></v-autocomplete>
______________________________________________________________________
db.collection('users').where("usertype", "==", "Patient")
.get()
.then(querySnapshot => {
const users = querySnapshot.docs.map(doc => doc.data())
this.patients = users;
})
I'm not sure how to get it working. attempted this but it doesn't really work. So I iterate through the docs and then save it to patients value when then populates the autocomplete tag. But it only shows up as object object Pic
Aucun commentaire:
Enregistrer un commentaire