1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated a whole load more js components

This commit is contained in:
Dan Brown
2022-11-15 16:04:46 +00:00
parent b37e84dc10
commit db79167469
25 changed files with 152 additions and 184 deletions

View File

@ -1,6 +1,7 @@
import {onChildEvent} from "../services/dom";
import {Component} from "./component";
class UserSelect {
export class UserSelect extends Component {
setup() {
this.input = this.$refs.input;
@ -13,13 +14,10 @@ class UserSelect {
selectUser(event, userEl) {
event.preventDefault();
const id = userEl.getAttribute('data-id');
this.input.value = id;
this.input.value = userEl.getAttribute('data-id');
this.userInfoContainer.innerHTML = userEl.innerHTML;
this.input.dispatchEvent(new Event('change', {bubbles: true}));
this.hide();
}
}
export default UserSelect;
}