Created
March 8, 2019 22:08
-
-
Save jelhan/c3006689d5e9f512d74a2614a5c424e1 to your computer and use it in GitHub Desktop.
ember-bootstrap-issue-769
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
moveTypeOptions: computed(function() { | |
return [{ | |
value: 0, | |
label: "I've dropped a GeoKret" | |
}, { | |
value: 1, | |
label: "I've grabbed a GeoKret" | |
}, { | |
value: 3, | |
label: "I've met GeoKret" | |
}, { | |
value: 5, | |
label: "I've dipped a GeoKret" | |
}, { | |
value: 2, | |
label: "Comment" | |
}]; | |
}), | |
selectedOption: computed('type', { | |
get() { | |
return this.moveTypeOptions.findBy('value', this.type); | |
}, | |
set(key, selectedOption) { | |
this.set('type', selectedOption.value); | |
return selectedOption; | |
} | |
}), | |
type: 0, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
}, | |
"addons": { | |
"ember-bootstrap": "2.6.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment