X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cc10d1ddfc652f6bcf3bbf61d5ec2e2861394c03..refs/pull/5429/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 9ff67d53e..29c06e909 100644 --- a/resources/js/components/entity-selector-popup.js +++ b/resources/js/components/entity-selector-popup.js @@ -15,14 +15,16 @@ export class EntitySelectorPopup extends Component { window.$events.listen('entity-select-confirm', this.handleConfirmedSelection.bind(this)); } - show(callback, searchText = '') { + /** + * Show the selector popup. + * @param {Function} callback + * @param {EntitySelectorSearchOptions} searchOptions + */ + show(callback, searchOptions = {}) { this.callback = callback; + this.getSelector().configureSearchOptions(searchOptions); this.getPopup().show(); - if (searchText) { - this.getSelector().searchText(searchText); - } - this.getSelector().focusSearch(); }