Search/sort within collection helper results in data table
When displaying the data table from any collection, the search field only seems to operate on visible fields from the current collection. I.e. any data displayed from collection helpers may not be searched, even though it may be visible in the data table.
E.g. in the following code, the generated data table will only search within the title field/column.
tableColumns: [
{label: "Title", name: "title"},
{label: "Helper", name: "collectionHelper()"}
]
Virtual fields cannot be searched through the database. One possible solutions is to provide a hook for changeSelector callback.
Alright, I am a bit unclear on how to use the changeSelector callback.
Yeah, I'm in the same boat, would love some idiot-proof example of how to do this after following that link and feeling inadequate...
I wasn't clear enough. I meant that it should be possible to define custom changeSelector callback. But that's not possible yet.
OK, thanks for the clarification. This is a really important feature for a project that I am working on. We have a collection uses three collection helpers, linking to and/or formatting data that are of primary importance. When users view the submissions for the primary collection, they will reflexively use the search field expecting to filter for results from the relationship collection helpers.
+1, "[Column] - (Not searchable)" isn't going to go down well with users hehe
There are two open issues related to this issue on the aldeed:tabular repository:
- https://github.com/aldeed/meteor-tabular/issues/114
- https://github.com/aldeed/meteor-tabular/issues/151
+1. Anyone got any type of workaround for this yet?
+1