The prop extraColumns for the <List /> component currently accepts the following: value, label, fields and search.
value accepts a function to generate new data from one or more properties of the document (or even data from other collections). Examples:
doc => Math.round(doc.score * 100) + ' %' to display a percentage.
doc => get(Meteor.users.findOne(doc.userId), 'profile.name', '') to display data from another collection.
To prevent confusion, we do not provide sorting functionality for custom columns, but the first example could still be useful for sorting. Learn more about sorting mongo documents.
Add an optional sort functionality for the custom columns.
The prop
extraColumnsfor the<List />component currently accepts the following:value,label,fieldsandsearch.valueaccepts a function to generate new data from one or more properties of the document (or even data from other collections). Examples:doc => Math.round(doc.score * 100) + ' %'to display a percentage.doc => get(Meteor.users.findOne(doc.userId), 'profile.name', '')to display data from another collection.To prevent confusion, we do not provide sorting functionality for custom columns, but the first example could still be useful for sorting. Learn more about sorting mongo documents.
Add an optional
sortfunctionality for the custom columns.