mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
19 lines
412 B
JavaScript
19 lines
412 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
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);
|
|
}
|
|
}
|