diff --git a/client/src/app/log-table/log-table.component.ts b/client/src/app/log-table/log-table.component.ts index f149ef5d..5722aad6 100644 --- a/client/src/app/log-table/log-table.component.ts +++ b/client/src/app/log-table/log-table.component.ts @@ -12,9 +12,10 @@ import { SimpleChanges } from "@angular/core"; import { ActivatedRoute } from '@angular/router'; - +import sortBy from 'lodash/sortBy'; import { EditLogApiOptions } from '../isari-logs/EditLogApiOptions.class'; + @Component({ selector: 'isari-log-table', templateUrl: './log-table.component.html', @@ -101,9 +102,9 @@ export class LogTableComponent implements OnInit, OnChanges { // field select Observable.fromPromise(this.isariDataService.getSchema(this.feature)) .subscribe(schema => - this.fields = Object.keys(schema).reduce((acc, value) => + this.fields = sortBy(Object.keys(schema).reduce((acc, value) => ([...acc, { value, label: schema[value].label[this.translate.currentLang] } ]) - , [])) + , []), 'label')); } }