Skip to content

Commit

Permalink
[front: editLogs] sort fields filter alpha. fix #441
Browse files Browse the repository at this point in the history
  • Loading branch information
t8g committed Sep 25, 2017
1 parent 311c51c commit 37a00de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/app/log-table/log-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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'));
}

}
Expand Down

0 comments on commit 37a00de

Please sign in to comment.