github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/components/single-select-dropdown/index.js (about) 1 import Component from '@glimmer/component'; 2 import { action } from '@ember/object'; 3 4 export default class SingleSelectDropdown extends Component { 5 get activeOption() { 6 return this.args.options.findBy('key', this.args.selection); 7 } 8 9 @action 10 setSelection({ key }) { 11 this.args.onSelect && this.args.onSelect(key); 12 } 13 }