open-nomad/ui/app/components/single-select-dropdown/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
333 B
JavaScript
Raw Normal View History

import Component from '@glimmer/component';
import { action } from '@ember/object';
export default class SingleSelectDropdown extends Component {
get activeOption() {
return this.args.options.findBy('key', this.args.selection);
}
@action
setSelection({ key }) {
this.args.onSelect && this.args.onSelect(key);
}
}