X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/9135a85de4eef32a91c7a3ee0aa405ed454e5a4c..refs/pull/5280/head:/resources/js/components/event-emit-select.js diff --git a/resources/js/components/event-emit-select.js b/resources/js/components/event-emit-select.js index 2e6fd5fdb..2097c0528 100644 --- a/resources/js/components/event-emit-select.js +++ b/resources/js/components/event-emit-select.js @@ -1,5 +1,5 @@ -import {onSelect} from "../services/dom"; -import {Component} from "./component"; +import {onSelect} from '../services/dom'; +import {Component} from './component'; /** * EventEmitSelect @@ -12,15 +12,15 @@ import {Component} from "./component"; * All options will be set as the "detail" of the event with * their values included. */ -export class EventEmitSelect extends Component{ +export class EventEmitSelect extends Component { + setup() { this.container = this.$el; this.name = this.$opts.name; - onSelect(this.$el, () => { this.$emit(this.name, this.$opts); }); } -} \ No newline at end of file +}