1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

[side nav] sort group list (#4027)

This commit is contained in:
llj
2019-08-28 12:16:56 +08:00
committed by Daniel Pan
parent c487805b59
commit 752aa3001c

View File

@@ -54,7 +54,9 @@ class MainSideNav extends React.Component {
this.groupsHeight = (groupList.length + 1) * _this.listHeight;
_this.setState({
groupItems: groupList
groupItems: groupList.sort((a, b) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1;
})
});
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);