Im fetching a group of documents in a forEach from Firestore, I know im fetching this all as I can see documents and is fields in the console. But when I add the id to the field fetched it only shows one document. (it should be 5 tiles and images but I can only see one) From reading I know
Tag: google-cloud-firestore
Trying to compare a string value from database(firestore) to a inputted string from a text field. im using vue framework
ignore all the commented out console logs, anyways, i tried setting both to a variable, i tried doing it by straight comparing this.username to the one in database. its getting the username from the database correctly, ive console logged it and it worked fine, outputted all the usernames from database. however at the if statement, it will not compare them
How do I order my database results from Firestore?
I am making an app that tracks the number of users’ tardiness using Firestore, but I can’t figure out how to order the list of results by number of tardy. I’ve tried using the orderBy() function from Firebase docs, but I haven’t been able to implement it correctly with my existing code yet. Answer From reading the documentation on ordering
Change only one specific value from dynamic input field
i need some help. So i have: This iterate some data from Firebase Firestore into the web page. Then there’s an input field to change the age. If i want to change doc.age, how do i do that? If i just write it like above, then if there are 10 names, all names will have the same age. How do
Firebase Version 9 using multiple conditional where clauses
I’m updating a project from Firebase Version 8 to Version 9. I have conditional filtered queries that used to be structured as follows: Then the query gets executed in a hook that rerenders everytime the filters change. Using Version 8, this works perfectly. In version 9, queries are now build to follow a format where each query is passed as
How to fix a this react filter?
I have created a database in firebase and I have fetch it in react, that is working correctly, but I want to include a search bar to filter the elements, my problem is that when I search for an element everything works but when I delete the text from the search input the elements do not appear again. Answer You
Rewrite this Firebase Web SDK Version 8 syntax into Version 9
I have a problem with Firebase in my React Native app. I’ve found a quick fix online, but it’s written in Firebase Web version 8 syntax: How can I rewrite it in Version 9 syntax? Answer You need to pass your settings to the initializeFirestore(app, settings) method. As you will read on this doc page: initializeFirestore(app, settings) initializes a new
React Firebase deleting the wrong document id
I’ve been trying to make a delete operation on a firebase database using Reactjs. I’ve got a bug with my function grabbing the wrong id from firebase. I have a button that calls a handleOpen function which opens a Modal. Modal operations: I’ve got a button that calls a handleDelete function which grabs the document id reference and deletes the
How to combine different paths in firestore version 9
I was using firestore version 8 and used the following code to create alternations in code: I couldn’t find a way to create such alternations in firestore version 9. Do you know how to create alternations in version 9? Answer the way I would approach this with V9 will be the follow: We now have a really nice API reference
How to convert Firestore Timestamp to Date() – Firestore V9
Before updating to V9, I use this: But now, after updating to V9, I run into 2 problems, and the documentation mentions nothing about Timestamp for javascript SDK: firebase.firestore.Timestamp is no longer available to use to check if a field is a Timestamp Object. None of the field has the “toDate()” function any more. So my questions are, with the