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
This discussion was converted from issue #1176 on November 18, 2022 09:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Steps to reproduce the behavior
Expected behavior
The created document appear in the UI
Actual behavior
The created document appear in the UI and the other documents turned into the new created document
Additional information
Code to get the collection
bindPosts: firestoreAction(({ bindFirestoreRef }) => bindFirestoreRef( 'posts', db .collection('post-feed') .where('type', '==', PostType.POST) .where('isDeleted', '==', false) .orderBy('createdAt', 'desc'), ), ),
Code the create a new document
createPost: firestoreAction(async (_, { post }: { post: IPost }) => { await db.doc(
posts/${post.id}).set(post) await db.doc(
post-feed/${post.id}).set({ postId: post.id, post: db.doc(
posts/${post.id}), type: post.type, isDeleted: post.isDeleted, createdAt: firestore.Timestamp.now(), updatedAt: firestore.Timestamp.now(), }) }),
Error shown when added a new document
Beta Was this translation helpful? Give feedback.
All reactions