window.$events.listen('entity-select-confirm', this.handleConfirmedSelection.bind(this));
}
- show(callback) {
+ /**
+ * Show the selector popup.
+ * @param {Function} callback
+ * @param {String} searchText
+ * @param {EntitySelectorSearchOptions} searchOptions
+ */
+ show(callback, searchText = '', searchOptions = {}) {
this.callback = callback;
+ this.getSelector().configureSearchOptions(searchOptions);
this.getPopup().show();
+
+ if (searchText) {
+ this.getSelector().searchText(searchText);
+ }
+
this.getSelector().focusSearch();
}