You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a collection where I want the ID of each document to be a number that increases by 1 on each new document. So far I have a callback that does the following:
This generates two IDs, the auto-generated one by Firestore and the one I generated. How can I only use the one from Firestore? I saw the onIdUpdate callback but it's synchronous and I don't think it's intended to fetch other documents.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi Nacho,
You are right, the onIdUpdate is sync only right now, and it is the method you need.
Changing the id prop in the values does not change the id of the document, but the id value inside it (which probably you don't want)
Adding a feature request: make onIdUpdate async.
By the way, we are also based in Madrid, you should join our discord community :) https://discord.gg/fxy7xsQm3m
Hi!
I have a collection where I want the ID of each document to be a number that increases by 1 on each new document. So far I have a callback that does the following:
Problem
This generates two IDs, the auto-generated one by Firestore and the one I generated. How can I only use the one from Firestore? I saw the
onIdUpdate
callback but it's synchronous and I don't think it's intended to fetch other documents.Thanks!
The text was updated successfully, but these errors were encountered: