]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-selector-popup.js
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / resources / js / components / entity-selector-popup.js
index e21e67fb33ebb2b6e1ec914d30d425114857bce4..29c06e9095113420b1d744d2fa73cd607635ea69 100644 (file)
@@ -15,9 +15,16 @@ export class EntitySelectorPopup extends Component {
         window.$events.listen('entity-select-confirm', this.handleConfirmedSelection.bind(this));
     }
 
-    show(callback) {
+    /**
+     * Show the selector popup.
+     * @param {Function} callback
+     * @param {EntitySelectorSearchOptions} searchOptions
+     */
+    show(callback, searchOptions = {}) {
         this.callback = callback;
+        this.getSelector().configureSearchOptions(searchOptions);
         this.getPopup().show();
+
         this.getSelector().focusSearch();
     }