]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-selector-popup.js
HTML: Aligned and standardised DOMDocument usage
[bookstack] / resources / js / components / entity-selector-popup.js
index e21e67fb33ebb2b6e1ec914d30d425114857bce4..9ff67d53efbe49637ddabd87f9fc50f333e9f2ac 100644 (file)
@@ -15,9 +15,14 @@ export class EntitySelectorPopup extends Component {
         window.$events.listen('entity-select-confirm', this.handleConfirmedSelection.bind(this));
     }
 
-    show(callback) {
+    show(callback, searchText = '') {
         this.callback = callback;
         this.getPopup().show();
+
+        if (searchText) {
+            this.getSelector().searchText(searchText);
+        }
+
         this.getSelector().focusSearch();
     }