Hi. I followed the example below, and noticed something peculiar.
If I put in a default value for the data slot (Eg. for ds_selectedRestaurantId in the example), I can reload the data sheet manually and get the correct row.
However, during actual code runtime, I only retrieve a row if the data slot has the value of the very first row in the Firestore database. Any other valid values from other rows in the DB, nothing gets returned.
Wondering if there is a bug in the code somewhere. It’s as if there’s a “limit 1” added somewhere deep in the code which happens to retrieve only the top row in my DB as the input of all this. But I have searched my own code and there is no “limit 1”
I have confirmed backward and forward that the value of the data slot gets updated and is correct because I did a console.log on the data slot.
I even tried enabling the option of “Update based on data slot” in the data sheet, and added a script to do another console.log. I could see every single time the data slot was updated, that my console.log fired. Yet the data sheet only returned a row during runtime if data slot contains the corresponding value in the first row in the DB.