Open bartonhammond opened 9 years ago
Filtering requires general multi-purpose solution: possibility define "filterable" fields (no matter are they boolean or another type) and to create interface for filtering. Or... maybe solution for this would be something like "Auto filter" available in "MS Excel".
However, I'l try to make quick solution for this because I wish to include your "todos" application into "official" meteor kitchen examples, and filtering on "completed" field is must-have feature for this kind of app.
While displaying a table of records in dataview, interactive filtering is not possible.
I would like to filter data with All, Active and Completed based on the boolean field "completed".
See Meteor Kitchen Todo App Code
As an example of what I am seeking, with the following changes I can interactively filter the data.
data_view.js: starting at line 5 by adding pageSession variable "TodosViewFilter"
Then in my dataview custom_component I can respond to href click events by updating the reactive pageSession variable with the mongo filter: