I’m trying to display contacts in a table where it’s possible to enter multiple contacts for the same address. I defined the settings for reactive table like this :
Template.masterlist.helpers({
settings: function() {
return {
collection: Prospects,
rowsPerPage: 10,
showFilter: true,
showColumnToggles: true,
fields: [
{
'key': 'address.streetNumber',
label: 'Street Number'
}, {
'key': 'address.streetName',
label: 'Street Name'
}, {
'key': 'address.streetApp',
label: 'App.'
}, {
'key': 'address.city',
label: 'City'
}, {
'key': 'address.province',
label: 'Province'
}, {
'key': 'address.postalCode',
label: 'Postal Code'
}, {
'key': 'contacts.0.name',
label: 'Name'
}, {
'key': 'contacts.0.phone',
label: 'Phone'
}, {
'key': 'contacts.0.email',
label: 'Email'
}, {
'key': 'contacts.0.notes',
label: 'Notes'
}
]
};
}
The problem is that it displays only the contact info for the first contact at this address I tried using [0] instead of just ‘0’ but it didn’t change anything.
Any idea?