Sort files and folders in the share path (#1960)

main
Schlotter Benjamin 6 years ago committed by GitHub
parent 667a3f92fe
commit 0de65e7d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Smaller object details (<https://github.com/opencv/cvat/pull/1877>)
- Files and folders under share path are now alphabetically sorted
### Deprecated
-

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.6.5",
"version": "1.6.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.6.5",
"version": "1.6.6",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {

@ -129,6 +129,8 @@ export default class FileManager extends React.PureComponent<Props, State> {
private renderShareSelector(): JSX.Element {
function renderTreeNodes(data: TreeNodeNormal[]): JSX.Element[] {
// sort alphabetically
data.sort((a: TreeNodeNormal, b: TreeNodeNormal): number => a.key.localeCompare(b.key));
return data.map((item: TreeNodeNormal) => {
if (item.children) {
return (

Loading…
Cancel
Save