Dropping select 2 for now

This commit is contained in:
Matthew Dillon 2015-11-10 21:32:49 -07:00
parent 1ee0e0e5ed
commit d46b3fc48b
2 changed files with 7 additions and 8 deletions

View file

@ -53,7 +53,8 @@ export default Component.extend({
},
characteristicDidChange: function(value) {
this.updateField('characteristic', value);
const newCharacteristic = this.get('allCharacteristics').findBy('id', value);
this.updateField('characteristic', newCharacteristic);
},
valueDidChange: function(value) {

View file

@ -1,13 +1,11 @@
{{#if isEditing}}
<td></td>
<td>
{{
select-2
multiple=false
content=allCharacteristics
value=characteristic
optionLabelPath="characteristicName"
}}
<select onchange={{action "characteristicDidChange" value="target.value"}}>
{{#each allCharacteristics as |characteristicChoice|}}
<option value={{characteristicChoice.id}} selected={{equal characteristic.id characteristicChoice.id}}>{{characteristicChoice.characteristicName}}</option>
{{/each}}
</select>
</td>
<td>
{{one-way-input type="text" class="measurement-value" value=value update=(action "valueDidChange")}}