-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Create a Feature that allows every property on the projection to be sortable
The third argument on model.projection can be a config object with the property sortable: true, this allow every property in this projection to be sortable.
But if we want to sort by a enum property, it'll sort by the ordinal, create a feature to send the map (ordinal, originalText) to sort by the original text instead of ordinal.
// provided by an i18n layer
var statusMap = {
0: 'Inactive',
1: 'Active',
2: 'Cancelled'
};
model.list({
projection: 'list',
sort: {
name: 'status',
using: statusMap
}
});
Reactions are currently unavailable