FIX: more results not appearing on scroll (#302)

This commit is contained in:
Keegan George 2023-11-21 09:46:37 -08:00 committed by GitHub
parent e0691e70e8
commit c55014839f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 10 deletions

View File

@ -112,7 +112,11 @@ export default class SemanticSearch extends Component {
@action
toggleAIResults() {
document.body.classList.toggle("showing-ai-results");
if (this.showingAIResults) {
this.args.outletArgs.addSearchResults([], "topic_id");
} else {
this.args.outletArgs.addSearchResults(this.AIResults, "topic_id");
}
this.showingAIResults = !this.showingAIResults;
}
@ -120,7 +124,6 @@ export default class SemanticSearch extends Component {
resetAIResults() {
this.AIResults = [];
this.showingAIResults = false;
document.body.classList.remove("showing-ai-results");
}
@action
@ -149,7 +152,6 @@ export default class SemanticSearch extends Component {
post.generatedByAI = true;
});
this.args.outletArgs.addSearchResults(model.posts, "topic_id");
this.AIResults = model.posts;
})
.catch(popupAjaxError)

View File

@ -61,7 +61,6 @@
}
.ai-result {
display: none;
border-radius: var(--d-border-radius);
.ai-result__icon {
@ -73,9 +72,3 @@
}
}
}
.showing-ai-results {
.ai-result {
display: flex;
}
}