FIX: more results not appearing on scroll (#302)
This commit is contained in:
parent
e0691e70e8
commit
c55014839f
|
@ -112,7 +112,11 @@ export default class SemanticSearch extends Component {
|
||||||
|
|
||||||
@action
|
@action
|
||||||
toggleAIResults() {
|
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;
|
this.showingAIResults = !this.showingAIResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +124,6 @@ export default class SemanticSearch extends Component {
|
||||||
resetAIResults() {
|
resetAIResults() {
|
||||||
this.AIResults = [];
|
this.AIResults = [];
|
||||||
this.showingAIResults = false;
|
this.showingAIResults = false;
|
||||||
document.body.classList.remove("showing-ai-results");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
@ -149,7 +152,6 @@ export default class SemanticSearch extends Component {
|
||||||
post.generatedByAI = true;
|
post.generatedByAI = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.args.outletArgs.addSearchResults(model.posts, "topic_id");
|
|
||||||
this.AIResults = model.posts;
|
this.AIResults = model.posts;
|
||||||
})
|
})
|
||||||
.catch(popupAjaxError)
|
.catch(popupAjaxError)
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-result {
|
.ai-result {
|
||||||
display: none;
|
|
||||||
border-radius: var(--d-border-radius);
|
border-radius: var(--d-border-radius);
|
||||||
|
|
||||||
.ai-result__icon {
|
.ai-result__icon {
|
||||||
|
@ -73,9 +72,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.showing-ai-results {
|
|
||||||
.ai-result {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue