Updated another set of components

This commit is contained in:
Dan Brown
2022-11-15 12:44:57 +00:00
parent 4310d34135
commit b37e84dc10
17 changed files with 119 additions and 143 deletions

View File

@ -1,14 +1,10 @@
/**
* Entity Selector Popup
* @extends {Component}
*/
class EntitySelectorPopup {
import {Component} from "./component";
export class EntitySelectorPopup extends Component {
setup() {
this.elem = this.$el;
this.container = this.$el;
this.selectButton = this.$refs.select;
window.EntitySelectorPopup = this;
this.selectorEl = this.$refs.selector;
this.callback = null;
@ -21,12 +17,12 @@ class EntitySelectorPopup {
show(callback) {
this.callback = callback;
this.elem.components.popup.show();
this.container.components.popup.show();
this.getSelector().focusSearch();
}
hide() {
this.elem.components.popup.hide();
this.container.components.popup.hide();
}
getSelector() {
@ -51,6 +47,4 @@ class EntitySelectorPopup {
this.getSelector().reset();
if (this.callback && entity) this.callback(entity);
}
}
export default EntitySelectorPopup;
}