ng2-table icon indicating copy to clipboard operation
ng2-table copied to clipboard

Default sorting

Open mbtakanov opened this issue 8 years ago • 1 comments

Hi! When I add { ..., 'sort'='asc', ...} to any of my columns (default sorting), the column doesn't get sorted, its values are all random. The demo itself - http://valor-software.com/ng2-table/ is not working. Look at the Office column - ...name: 'office', sort: 'asc'}. Is this a bug or what?

mbtakanov avatar Jun 26 '17 11:06 mbtakanov

Ok, I figure it out. You have bug in your example on this line if (columns[i].sort !== '' && columns[i].sort !== false) { This condition is incomplete, because the way it is now, columns without sort property will fulfill the condition. The line should be like this: if (columns[i].sort !== '' && columns[i].sort !== false && columns[i].sort !== undefined) {

mbtakanov avatar Jun 27 '17 09:06 mbtakanov