manuel
(Manuel Kostka)
7 september 2024 om 07:48
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
7 september 2024 om 07:52
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
manuel
(Manuel Kostka)
7 september 2024 om 08:03
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)
gesloten
7 oktober 2024 om 08:04
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.