-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(callback, searchText = '') {
this.callback = callback;
this.getPopup().show();
+
+ if (searchText) {
+ this.getSelector().searchText(searchText);
+ }
+
this.getSelector().focusSearch();
}
this.getSelector().reset();
if (this.callback && entity) this.callback(entity);
}
-}
\ No newline at end of file
+
+}