-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(populate): ordered data from populate #180
Comments
@nemo This is an extremely general bug description, and I don't believe I am understanding. Data is not ever populated within state, it is populated as you get it out of state using |
So in this scenario, I would expect const PoetsList = compose(
firestoreConnect((props, state) => [
{
collection: 'poets',
orderBy: ['name'],
limit: 1000,
populates: [{ child: '_venue', root: 'venues' }],
storeAs: 'orderedPoets'
}
]),
connect((state, props) => ({
poets: state.firestore.ordered.orderedPoets || []
}))
)(Poets) However – it's not, because I can't use the const PoetsList = compose(
firestoreConnect((props, state) => [
{
collection: 'poets',
orderBy: ['name'],
limit: 1000,
populates: [{ child: '_venue', root: 'venues' }],
storeAs: 'orderedPoets'
}
]),
connect((state, props) => ({
poets: populate(state.firestore, 'orderedPoets', [{ child: '_venue', root: 'venues' }])
}))
)(Poets) Does that make sense? Or maybe I just don't know how to use |
@nemo As you show in the second example there, you need to use That said, it would be good to support ordered population, so lets have this ticket be a tracking of that feature 😄 |
Yes – that's really what I've been trying to say, but utterly failing at it. I want |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
ordered data isn't populated
What is the expected behavior?
oredered data to be populated.
Which versions of dependencies, and which browser are affected by this issue? Did this work in previous versions or setups?
Never worked.
Steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.
Populate a collection and look at state.firestore.ordered.
The text was updated successfully, but these errors were encountered: