Add characteristics. Select All blocks for way too long.
This commit is contained in:
parent
a4fc06d22d
commit
6f15bc940d
2 changed files with 13 additions and 9 deletions
app/pods/protected/compare/select-form
|
@ -20,7 +20,7 @@ export default Component.extend({
|
|||
|
||||
updateCharacteristics: function(selection) {
|
||||
this.set('selectedCharacteristics', selection);
|
||||
this.attrs['update-characteristics'](this.get('selectedCharacteristics'));
|
||||
this.attrs['update-characteristics'](selection);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -51,15 +51,19 @@ export default Component.extend({
|
|||
chars.forEach((char) => {
|
||||
char_ids.push(char.get('id'));
|
||||
});
|
||||
this.updateCharacteristics(char_ids.join(","));
|
||||
this.updateCharacteristics(char_ids);
|
||||
},
|
||||
|
||||
deselectAllCharacteristics: function() {
|
||||
this.updateCharacteristics("");
|
||||
this.updateCharacteristics([]);
|
||||
},
|
||||
|
||||
updateStrainSelection: function(selection) {
|
||||
this.updateStrains(selection);
|
||||
},
|
||||
|
||||
updateCharacteristicSelection: function(selection) {
|
||||
this.updateCharacteristics(selection);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
<li>
|
||||
<label>Characteristics</label>
|
||||
{{
|
||||
select-2
|
||||
x-select
|
||||
listItems=characteristics
|
||||
nameAttr="characteristicName"
|
||||
update=(action "updateCharacteristicSelection")
|
||||
placeholder="Select one ore more characteristics"
|
||||
multiple=true
|
||||
content=characteristics
|
||||
value=selectedCharacteristics
|
||||
optionValuePath="id"
|
||||
optionLabelPath="characteristicName"
|
||||
placeholder="Select one or more characteristics"
|
||||
selected=selectedCharacteristics
|
||||
}}
|
||||
</li>
|
||||
<li>
|
||||
|
|
Reference in a new issue