meteor-tabular
meteor-tabular copied to clipboard
Search and Custom Publications
Hi. Any tips on how I can search within another publication? Thanks.
Can you explain more ?
I'm using a custom publication to insert some fields from other collections into the main collection I'm publishing. I was hoping by doing this in the server publication code that the data-table would get access to search and sorting of fields that weren't originally in the main collection... nope.
Is true denormalization of the data to the main collection you're displaying the only way to get access to search and sort on fields/columns that aren't in the main collection you're displaying?
The docs mention one publication that figures out the _ids needed then another that you can override with pub that actually queries the docs. I'm thinking it's the first publication that handles the sorting, searching, and pagination. Would probably need to override that.
You can use changeSelector on Server side of the Table creation. https://atmospherejs.com/aldeed/tabular#modifying-the-selector. Modify _ids there and it works