Filter by nested fields
See original GitHub issueHi there!
I hope you are doing well! Every time I come back to this project, it’s awesome to see all the updates!
I am not sure if this is a feature request or already possible but I would like to filter a collection by nested fields. For example, I have an entity with the following fields in firebase:
config: {
filters: {
publish: true,
free: false
}
}
Is there a way I could have a filter in the collection view such that I only see entities with config.filters.publish == true or false? Firestore supports querying by nested fields so it shouldn’t be an issue with firestore queries on that.
If it is not possible using the filterCombinations field in EntityCollection, is there a workaround; for instance, through a button in the extraActions component?
If this is not at all possible, will be great to have it in the future! 😃
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
I forgot to confirm on this one, but that worked a treat @fgatti675 - seems I was just trying the wrong combinations! Thank you very much for your assistance ❤️
I think there are a couple of things here. Firestore does not allow to have one filter set, and order by a different one, like you are doing here. ‘firstName’ and ‘tutor’ I can’t test this right now, but I think the syntax for the filter would be