FIX: Cleanup AI search results when a subsequent search happens (#469)

This commit is contained in:
Rafael dos Santos Silva 2024-02-13 21:08:41 -03:00 committed by GitHub
parent 2092ffd141
commit 33164a0fec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -106,6 +106,7 @@ export default class SemanticSearch extends Component {
resetAIResults() {
this.AIResults = [];
this.showingAIResults = false;
this.args.outletArgs.addSearchResults([], "topic_id");
}
@action
@ -127,11 +128,10 @@ export default class SemanticSearch extends Component {
return this.performHyDESearch();
}
this.resetAIResults();
withPluginApi("1.15.0", (api) => {
api.onAppEvent("full-page-search:trigger-search", () => {
if (!this.searching) {
this.resetAIResults();
return this.performHyDESearch();
}
});