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

feat(firestore): Add SnapshotOptions #83

Merged
merged 2 commits into from
Aug 27, 2023
Merged

feat(firestore): Add SnapshotOptions #83

merged 2 commits into from
Aug 27, 2023

Conversation

davideast
Copy link
Collaborator

Mostly addresses #58.

This PR adds support for SnapshotOptions within the data mapping functions like docData() and collectionData(). The existing options object only supported idField. This PR merges that configuration with SnapshotOptions to avoid a breaking change. We will address the addition of SnapshotOptions for non data mapping functions in the next release as it would require an awkward API or a breaking change.

collectionData(colRef, {idField: 'userId', serverTimestamps: 'estimate'});
docData(docRef, {idField: 'userId', serverTimestamps: 'estimate'});

@davideast davideast merged commit df3b568 into main Aug 27, 2023
19 checks passed
@davideast davideast deleted the snapshot-options branch August 27, 2023 16:55
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

Successfully merging this pull request may close these issues.

1 participant