FIX: Cleanup AI search results when a subsequent search happens (#469)
This commit is contained in:
parent
2092ffd141
commit
33164a0fec
|
@ -106,6 +106,7 @@ export default class SemanticSearch extends Component {
|
||||||
resetAIResults() {
|
resetAIResults() {
|
||||||
this.AIResults = [];
|
this.AIResults = [];
|
||||||
this.showingAIResults = false;
|
this.showingAIResults = false;
|
||||||
|
this.args.outletArgs.addSearchResults([], "topic_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -127,11 +128,10 @@ export default class SemanticSearch extends Component {
|
||||||
return this.performHyDESearch();
|
return this.performHyDESearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resetAIResults();
|
|
||||||
|
|
||||||
withPluginApi("1.15.0", (api) => {
|
withPluginApi("1.15.0", (api) => {
|
||||||
api.onAppEvent("full-page-search:trigger-search", () => {
|
api.onAppEvent("full-page-search:trigger-search", () => {
|
||||||
if (!this.searching) {
|
if (!this.searching) {
|
||||||
|
this.resetAIResults();
|
||||||
return this.performHyDESearch();
|
return this.performHyDESearch();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue