1 import {onChildEvent} from "../services/dom";
6 this.input = this.$refs.input;
7 this.userInfoContainer = this.$refs.userInfo;
9 this.hide = this.$el.components.dropdown.hide;
11 onChildEvent(this.$el, 'a.dropdown-search-item', 'click', this.selectUser.bind(this));
14 selectUser(event, userEl) {
15 event.preventDefault();
16 const id = userEl.getAttribute('data-id');
17 this.input.value = id;
18 this.userInfoContainer.innerHTML = userEl.innerHTML;
19 this.input.dispatchEvent(new Event('change', {bubbles: true}));
25 export default UserSelect;