mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-27 06:01:54 +03:00
Entity selector: Fixed initial load overwriting initial search
This changes how initial searches can be handled via config rather than specific action so they can be considered in how the initial data load is done, to prevent the default empty state loading and overwriting the search data if it lands later (which was commonly likely). For #4778
This commit is contained in:
@ -18,18 +18,13 @@ export class EntitySelectorPopup extends Component {
|
||||
/**
|
||||
* Show the selector popup.
|
||||
* @param {Function} callback
|
||||
* @param {String} searchText
|
||||
* @param {EntitySelectorSearchOptions} searchOptions
|
||||
*/
|
||||
show(callback, searchText = '', searchOptions = {}) {
|
||||
show(callback, searchOptions = {}) {
|
||||
this.callback = callback;
|
||||
this.getSelector().configureSearchOptions(searchOptions);
|
||||
this.getPopup().show();
|
||||
|
||||
if (searchText) {
|
||||
this.getSelector().searchText(searchText);
|
||||
}
|
||||
|
||||
this.getSelector().focusSearch();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user