Skip to content
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

Returning DocumentReference will be great #84

Open
kbala-ami opened this issue Nov 23, 2019 · 0 comments
Open

Returning DocumentReference will be great #84

kbala-ami opened this issue Nov 23, 2019 · 0 comments

Comments

@kbala-ami
Copy link

kbala-ami commented Nov 23, 2019

...(id ? { [id]: v.id } : null),

@codediodeio, It would be really great if the result document returns ref(DocumentReference) instead of id

function snapToData(id = 'id') {
  return map((querySnapshot: fb.firestore.QuerySnapshot) =>
    querySnapshot.docs.map(v => {
      return {
       ref: v.ref, //lets return document.ref  ...(id ? { [id]: v.id } : null), 
        ...v.data()
      };
    })
  );
}

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant