Users collection data does not display on reactive table


#1

I am using asgle reactive table and this is my code

Template.Schools.tables = function () {
    return Meteor.users.find();
}

Template.Schools.tableSettings = function () {
    return {
        rowsPerPage: 5,
        showFilter: true,
        showNavigation: 'auto',
        fields: [
            { key: '_id', label: 'Id' },
            { key: 'profile.schoolname', label: 'Name' },
            { key: 'profile.schooltelephonenumber', label: 'Telephone' },
            { key: 'profile.schoollocation', label: 'Location' }
        ],
        useFontAwesome: true,
        group: 'client'
    };
}

and in my html i have

{{> reactiveTable collection=tables settings=tableSettings}}

i have also published users

Meteor.publish('users', function () {
  return Meteor.users.find();
});

I have some data in the users collection but all my code is showing is the labels.


#2

I solved it this way.

In the helper

 settings: function () {
    return {
    collection: 'ma',
    rowsPerPage: 5,
    showFilter: true,
    showNavigation: 'auto',
    fields: [
        { key: '_id', label: 'Id' },
        { key: 'profile.schoolname', label: 'Name' },
        { key: 'profile.schooltelephonenumber', label: 'Telephone' },
        { key: 'profile.schoollocation', label: 'Location' }
    ],
    useFontAwesome: true,
    group: 'client'
};
},

and in my publish

ReactiveTable.publish("ma",
    function () {
            return Meteor.users;
    }
);

the html

{{> reactiveTable settings=settings}