Support filter params in discussion list state

https://github.com/flarum/core/pull/3068 accidentially broke the user discussions page, as up until this commit, `DiscussionListState`didn't accept any filter params.
This commit is contained in:
Alexander Skvortsov 2021-10-06 23:30:32 -04:00
parent b5faef9a89
commit 0fd04cc330

View File

@ -14,7 +14,7 @@ export default class DiscussionListState extends PaginatedListState<Discussion>
} }
requestParams() { requestParams() {
const params: any = { include: ['user', 'lastPostedUser'], filter: {} }; const params: any = { include: ['user', 'lastPostedUser'], filter: this.params.filter || {} };
params.sort = this.sortMap()[this.params.sort]; params.sort = this.sortMap()[this.params.sort];