]>
BookStack Code Mirror - bookstack/blobdiff - resources/js/components/entity-selector-popup.js
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Entity selector: Fixed initial load overwriting initial search
[bookstack]
/
resources
/
js
/
components
/
entity-selector-popup.js
diff --git
a/resources/js/components/entity-selector-popup.js
b/resources/js/components/entity-selector-popup.js
index 9ff67d53efbe49637ddabd87f9fc50f333e9f2ac..29c06e9095113420b1d744d2fa73cd607635ea69 100644
(file)
--- a/
resources/js/components/entity-selector-popup.js
+++ b/
resources/js/components/entity-selector-popup.js
@@
-15,14
+15,16
@@
export class EntitySelectorPopup extends Component {
window.$events.listen('entity-select-confirm', this.handleConfirmedSelection.bind(this));
}
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.callback = callback;
+ this.getSelector().configureSearchOptions(searchOptions);
this.getPopup().show();
this.getPopup().show();
- if (searchText) {
- this.getSelector().searchText(searchText);
- }
-
this.getSelector().focusSearch();
}
this.getSelector().focusSearch();
}