class UserSelect {
setup() {
-
this.input = this.$refs.input;
this.userInfoContainer = this.$refs.userInfo;
}
selectUser(event, userEl) {
+ event.preventDefault();
const id = userEl.getAttribute('data-id');
this.input.value = id;
this.userInfoContainer.innerHTML = userEl.innerHTML;
+ this.input.dispatchEvent(new Event('change', {bubbles: true}));
this.hide();
}