-import {Component} from "./component";
+import {Component} from './component';
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();
}
this.getSelector().reset();
if (this.callback && entity) this.callback(entity);
}
-}
\ No newline at end of file
+
+}