]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-selector-popup.js
Add optional OIDC avatar fetching from the “picture” claim
[bookstack] / resources / js / components / entity-selector-popup.js
index 9ff67d53efbe49637ddabd87f9fc50f333e9f2ac..29c06e9095113420b1d744d2fa73cd607635ea69 100644 (file)
@@ -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();
     }