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

Support Firestore SDK SnapshotOptions #58

Open
jorroll opened this issue Jul 20, 2022 · 0 comments
Open

Support Firestore SDK SnapshotOptions #58

jorroll opened this issue Jul 20, 2022 · 0 comments
Assignees

Comments

@jorroll
Copy link

jorroll commented Jul 20, 2022

When subscribing to Firestore data without using rxfire, the Firestore SDK (at least v9) supports optional SnapshotOptions when getting data from a snapshot. E.g.

// Currently, the only SnapshotOption is `serverTimestamps`.
snap.data({ serverTimestamps: "estimate" });

When using docData() or collectionData(), in addition to allowing the user to provide an optional idField, I'd like to be able to provide SnapshotOptions and, specifically, the serverTimestamps option so that returned documents have an "estimate" timestamp value rather than null.

If it were possible, I might recommend upstreaming the idField option to the main Firebase SDK repo so that "idField" is added to SnapshotOptions and becomes officially supported. At that point, rxfire could simply pass all the SnapshotOptions provided to docData or collectionData internally to snap.data(options).

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

2 participants