Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reactiveTable error: fields option is required with server-side publications #485

Open
theavijitsarkar opened this issue Feb 9, 2018 · 1 comment

Comments

@theavijitsarkar
Copy link

I tried to publish a basic collection and show it on the UI, but I get an error. I tried adding fields but that doesn't solve anything.

/client/dashboard.html

{{> reactiveTable collection="attendance_dashboard_table"}}

/server/publish.js

//Attempt 1
ReactiveTable.publish("attendance_dashboard_table", Attendance_dashboard);
//Attempt 2 
ReactiveTable.publish("attendance_dashboard_table", Attendance_dashboard, function(){
    return {owner: this.userId}
}, {fields: {owner:0}});

Error

reactiveTable error: fields option is required with server-side publications
@theavijitsarkar theavijitsarkar changed the title Basic Server Side Publish Not Working : reactiveTable error: fields option is required with server-side publications reactiveTable error: fields option is required with server-side publications Feb 9, 2018
@aslagle
Copy link
Owner

aslagle commented Feb 9, 2018

The fields option is required on the client, not on the server. So you'll need to pass in fields when you create the table in your template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants