X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b37e84dc101e8ca5c80bcd731adb9cc19b9e08ab..refs/pull/3908/head:/resources/js/components/entity-selector-popup.js diff --git a/resources/js/components/entity-selector-popup.js b/resources/js/components/entity-selector-popup.js index 69534dea5..d455f7ee7 100644 --- a/resources/js/components/entity-selector-popup.js +++ b/resources/js/components/entity-selector-popup.js @@ -17,16 +17,26 @@ export class EntitySelectorPopup extends Component { show(callback) { this.callback = callback; - this.container.components.popup.show(); + this.getPopup().show(); this.getSelector().focusSearch(); } hide() { - this.container.components.popup.hide(); + this.getPopup().hide(); } + /** + * @returns {Popup} + */ + getPopup() { + return window.$components.firstOnElement(this.container, 'popup'); + } + + /** + * @returns {EntitySelector} + */ getSelector() { - return this.selectorEl.components['entity-selector']; + return window.$components.firstOnElement(this.selectorEl, 'entity-selector'); } onSelectButtonClick() {