1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

order file-chooser list (#2791)

This commit is contained in:
杨顺强
2019-01-09 14:40:36 +08:00
committed by Daniel Pan
parent 9c230cc5db
commit 300251b5b1
3 changed files with 12 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { seafileAPI } from '../../utils/seafile-api';
import Dirent from '../../models/dirent';
import { Utils } from '../../utils/utils';
const propTypes = {
isShowFile: PropTypes.bool,
@@ -52,6 +53,7 @@ class DirentListItem extends React.Component {
direntList.push(dirent);
}
}
direntList = Utils.sortDirents(direntList, 'name', 'asc');
this.setState({
hasRequest: true,
direntList: direntList,