Open matt-tingen opened 6 years ago
This may be able to be added to isLoaded
through a reduce that is checking for any non falsey values. The problem that may come up with that though is the loading a document with all falsey values or an object in RTDB which is all falsey values.
Open to ideas, but going to give this some thought before moving forward with a solution. Thanks for posting!
Do you want to request a feature or report a bug?
Bug?
What is the current behavior?
isEmpty
returnsfalse
for collections with only deleted docs e.g.{ id1: null, id2: null }
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.
Create a list component connected to firestore which changes its render when the collection is empty. Delete all the docs from the collection.
What is the expected behavior?
isEmpty
returnstrue
for collections with only deleted docs. To avoid making a breaking change and still allow for e.g. animating of the deletion of the last item in a collection, it may make more sense to either:isEmpty
except when operating on collections with only deleted docs.Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?
react-redux-firebase 2.1.4 MacOS 10.13 Chrome 66