Fixed members list sorting

no issue
This commit is contained in:
Rish 2019-10-07 17:05:40 +05:30
parent 38e36104b8
commit 7313b9145f

View File

@ -29,6 +29,8 @@ export default Controller.extend({
let {name, email} = member;
return (name && name.toLowerCase().indexOf(searchText) >= 0)
|| (email && email.toLowerCase().indexOf(searchText) >= 0);
}).sort((a, b) => {
return b.get('createdAt').valueOf() - a.get('createdAt').valueOf();
});
return filtered;