-
-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of $bind with nested key path #404
Comments
It's not completely supported yet. BTW you should declare Duplicate of #152 |
@posva Actually I intend to have dynamic I've also seen #152, and though it refers to firebaseRTDB, while I'm referring to firestore. I would also like to know if there is any workaround for dynamic $bind() of keys. Thanks! |
#152 is for both For dynamic keys, you should sett them with |
@posva Thanks for the pointer, I manage to get it working with: const documents = db.collection('documents')
export default {
props: ['documentId'],
data: () => ({ docs: { }}),
},
watch: {
documentId(id) {
// $set manually for reactivity to work
this.$set(this.docs, id, null)
this.$bind(`docs.${id}`, documents.doc(id))
},
},
} I noticed that when binding this way, $bind always return I would also propose having a topic on "Dynamic binding with |
Added to the roadmap #145 🙂 |
I intend to
$bind
a collection of documents underdocs
byid
. It seems to work, and wonder if it is supported officially.The text was updated successfully, but these errors were encountered: