1 import {onSelect} from "../services/dom";
5 * Component will simply emit an event when selected.
7 * Has one required option: "name".
8 * A name of "hello" will emit a component DOM event of
9 * "event-emit-select-name"
11 * All options will be set as the "detail" of the event with
12 * their values included.
14 * @extends {Component}
16 class EventEmitSelect {
18 this.container = this.$el;
19 this.name = this.$opts.name;
22 onSelect(this.$el, () => {
23 this.$emit(this.name, this.$opts);
29 export default EventEmitSelect;