Monasha Monasha - 1 year ago 102
HTML Question

Pass argument to collection in meteor reactive-table

I am using package


I want to pass an argument to the
option of the reactive table

I have checked this also Meteor Reactive Table Helper Arguments but the comments on the post didn't help.

Html Code:

{{#each staffCode}}
{{> reactiveTable collection=collectionDetails settings=settingsResult}}


collectionDetails: function(staffCode){
return someCollection.find({staff_code: staffCode});
settingsResult: function(){
return {
rowsPerPage: 20,
showFilter: false,
showNavigation: 'auto',
fields: [
key: 'some_key', label: 'Some Label' ,

So far I tried putting

{{#each staffCode}}
{{> reactiveTable collection=collectionDetails ../code settings=settingsResult}}

But this doesn't work and gives the following error in the terminal

Can't have a non-keyword argument after a keyword argument

Answer Source

Those who have the same issue, I have solved the problem, here's the way I approached it.

{{#each staffCode}}
    {{#with collectionDetails code}}
        {{> reactiveTable collection=this settings=settingsResult}}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download