nolo
(Manuel)
September 7, 2024, 7:48am
1
I’m using Featured Lists to showcase selected lists of topics. I can use list filters like “latest”, “top” or “unread” without issues. But when I try to filter for “hot”, I get a strange selection:
The selection doesn’t match the actual Hot list:
I don’t know why this doesn’t work. This is how filters are applied:
const userFilters = ['new', 'unread'];
if (userFilters.includes(`${this.args.list.filter}`) && !this.currentUser) {
return;
}
let solvedFilter;
if (this.args.list.solved) {
solvedFilter = this.args.list.solved === 'solved' ? 'yes' : 'no';
}
const topicList = await this.store.findFiltered('topicList', {
filter: this.args.list.filter,
params: {
order: 'activity',
category: this.args.list.category,
tags: this.args.list.tag,
solved: solvedFilter,
},
});
if (topicList.topics) {
return (this.filteredTopics = topicList.topics.slice(
Moin
September 7, 2024, 7:52am
2
When you order your actual hot list also by “activity”, do you then get the same result as in your components list?
2 Likes
nolo
(Manuel)
September 7, 2024, 8:03am
3
Indeed Thank you @Moin
When I order for activity I get the same topics on the Hot list:
And when I don’t apply the order on the component, I get the Hot list as I’d like it:
From what I see so far, I could probably just drop order: "activity"
from the component code, as it’s applied by default on other lists anyway.
2 Likes
system
(system)
Closed
October 7, 2024, 8:04am
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.