Closed Rory80Hz closed 7 years ago
On specifying an order when grouping by health:
var health_order = [ 'unknown', 'risk', 'fair', 'good' ];
passing this to the following function in routes.js should guarantee order:
controller.setupIndexPageRoute(healthGroupFunc, '/health', health_order, 'health');
However, the sorting function in controller.js does not actually sort by the row_order, it simply sorts the list alphabetically.
function prepareRowOrder(rowOrder, data) { rowOrder = []; _.each(data, function(value, key, list) { rowOrder.push(key); }); rowOrder.sort();
return rowOrder;
}
On specifying an order when grouping by health:
var health_order = [ 'unknown', 'risk', 'fair', 'good' ];
passing this to the following function in routes.js should guarantee order:
controller.setupIndexPageRoute(healthGroupFunc, '/health', health_order, 'health');
However, the sorting function in controller.js does not actually sort by the row_order, it simply sorts the list alphabetically.
function prepareRowOrder(rowOrder, data) { rowOrder = []; _.each(data, function(value, key, list) { rowOrder.push(key); }); rowOrder.sort();
}