Force sort order for compare
This commit is contained in:
parent
4e5a91f776
commit
c350dd6fcc
2 changed files with 9 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
|
|
||||||
const { Component } = Ember;
|
const { Component, computed: { sort } } = Ember;
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
characteristics: null,
|
characteristics: null,
|
||||||
|
@ -10,6 +10,12 @@ export default Component.extend({
|
||||||
"update-strains": null,
|
"update-strains": null,
|
||||||
"update-characteristics": null,
|
"update-characteristics": null,
|
||||||
|
|
||||||
|
|
||||||
|
charSortParams: ['characteristicTypeName', 'sortOrder', 'characteristicName'],
|
||||||
|
sortedCharacteristics: sort('characteristics', 'charSortParams'),
|
||||||
|
strainSortParams: ['sortOrder'],
|
||||||
|
sortedStrains: sort('strains', 'sortParams'),
|
||||||
|
|
||||||
selectedStrains: [],
|
selectedStrains: [],
|
||||||
selectedCharacteristics: [],
|
selectedCharacteristics: [],
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<label>Strains</label>
|
<label>Strains</label>
|
||||||
{{
|
{{
|
||||||
x-select
|
x-select
|
||||||
options=strains
|
options=sortedStrains
|
||||||
nameAttr='fullNameMU'
|
nameAttr='fullNameMU'
|
||||||
multiple=true
|
multiple=true
|
||||||
selected=selectedStrains
|
selected=selectedStrains
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<label>Characteristics</label>
|
<label>Characteristics</label>
|
||||||
{{
|
{{
|
||||||
x-select
|
x-select
|
||||||
options=characteristics
|
options=sortedCharacteristics
|
||||||
nameAttr='characteristicName'
|
nameAttr='characteristicName'
|
||||||
multiple=true
|
multiple=true
|
||||||
selected=selectedCharacteristics
|
selected=selectedCharacteristics
|
||||||
|
|
Reference in a new issue