DEV: Outlet for unobtrusive secondary full-page search. (#23390)

`discourse-ai` will use the outlet to perform a parallel semantic search.
This commit is contained in:
Roman Rizzi 2023-09-05 10:45:09 -03:00 committed by GitHub
parent 2768f3a968
commit 7a34ea7953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -55,6 +55,7 @@ export default Controller.extend({
application: controller(),
composer: service(),
modal: service(),
appEvents: service(),
bulkSelectEnabled: null,
loading: false,
@ -510,6 +511,9 @@ export default Controller.extend({
?.removeAttribute("open");
}
this.set("page", 1);
this.appEvents.trigger("full-page-search:trigger-search");
this._search();
},

View File

@ -81,6 +81,12 @@
</div>
<div class="search-advanced">
<PluginOutlet
@name="full-page-search-below-search-header"
@connectorTagName="div"
@outletArgs={{hash search=this.searchTerm type=this.search_type}}
/>
{{#if this.hasResults}}
{{#if this.usingDefaultSearchType}}
<div