Sorts files by name

This commit is contained in:
Aaron Louie 2020-02-11 11:00:31 -05:00
parent 165a6f06e6
commit 3c4ac7f4d8
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ export class FileListComponent implements OnInit {
private _loadFileMetas() { private _loadFileMetas() {
this.api.getFileMetas({workflow_spec_id: this.workflowSpec.id}).subscribe(fms => { this.api.getFileMetas({workflow_spec_id: this.workflowSpec.id}).subscribe(fms => {
this.fileMetas = fms; this.fileMetas = fms.sort((a, b) => (a.name > b.name) ? 1 : -1);
this._loadFileData(); this._loadFileData();
}); });
} }