Use API sort order for species
This commit is contained in:
parent
a669945c35
commit
e33852120a
3 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,7 @@ const { Component, computed: { sort } } = Ember;
|
|||
export default Component.extend(SetupMetaData, {
|
||||
species: null,
|
||||
|
||||
sortParams: ['speciesName', 'strainCount'],
|
||||
sortParams: ['sortOrder'],
|
||||
sortedSpecies: sort('species', 'sortParams'),
|
||||
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Ember from 'ember';
|
||||
import SetupMetaData from '../../../../mixins/setup-metadata';
|
||||
|
||||
const { Component } = Ember;
|
||||
const { Component, computed: { sort } } = Ember;
|
||||
|
||||
export default Component.extend(SetupMetaData, {
|
||||
// Read-only attributes
|
||||
|
@ -19,6 +19,10 @@ export default Component.extend(SetupMetaData, {
|
|||
"save-measurement": null,
|
||||
"delete-measurement": null,
|
||||
|
||||
// CPs
|
||||
sortParams: ['sortOrder'],
|
||||
sortedSpeciesList: sort('speciesList', 'sortParams'),
|
||||
|
||||
// Property mapping
|
||||
propertiesList: ['strainName', 'typeStrain', 'species', 'isolatedFrom', 'accessionNumbers', 'genbank', 'wholeGenomeSequence', 'notes'],
|
||||
strainName: null,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<label>Species</label>
|
||||
{{
|
||||
x-select
|
||||
options=speciesList
|
||||
options=sortedSpeciesList
|
||||
nameAttr='speciesName'
|
||||
selected=species.id
|
||||
update=(action "speciesDidChange")
|
||||
|
|
Reference in a new issue