feat: Implement post search.

Related tickets:
* [TNL-8428](https://openedx.atlassian.net/browse/TNL-8428)
* [BB-4418 (OpenCraft Internal)](https://tasks.opencraft.com/browse/BB-4418)
This commit is contained in:
João Cabrita
2021-07-18 15:04:41 +01:00
parent 812248f8c8
commit c4244cf95a
3 changed files with 6 additions and 2 deletions

View File

@@ -60,6 +60,9 @@ export function fetchThreads(courseId, {
if (filters.status === PostsStatusFilter.UNREAD) {
options.view = 'unread';
}
if (filters.search) {
options.textSearch = filters.search;
}
return async (dispatch) => {
try {
dispatch(fetchThreadsRequest({ courseId }));