I have lots of data and have to paginate it for speed and UX. I need to be able to filter on the whole set of records though.
I’m creating my filters from some fields of my documents that are currently in MiniMongo (so just what would be on the current page as opposed to the full dataset). The filter options are then displayed in
What’s the desired pattern for doing something like this? My first thought was to do one initial, separate and one-time subscription
onCreated that would just get a
projection of the fields I need for ALL my documents. However, I’m not sure about the efficiency of this. Also, I’d then be re-subscribing to the same collection for my paginated records. So there’s definitely redundancy here. Storing the filter options somewhere else isn’t really a solution as the filters are dynamically created from the records themselves.
I use https://github.com/percolatestudio/publish-counts to get the full count of the records. If only I could use something like that to just get my filters too.