On the Landing page, course tracks are displayed with options to filter by category and sort by various parameters. However, there are several issues with how the tracks are sorted when categories or sorting options are changed.
Steps to Reproduce:
Open the homepage where the courses are listed.
By default, tracks are displayed in "newest first" order.
Change the category from the filter options. Issue: The tracks do not maintain the "newest first" order after changing the category (latest tracks should appear first by default).
Select a sorting option, such as "descending". The tracks are sorted correctly in descending order.
Change the category again. Issue: The tracks appear in random order, and the same sorting option is still selected in the dropdown (here, "descending").
Attempt to re-select the "descending" sorting option. Issue: The "descending" option cannot be re-selected unless another sorting option is chosen first.
Expected Behavior:
When the category is changed, the latest tracks should appear first.
If a sort option is selected, changing the category should reset the selected sort option, and tracks should be sorted in "newest first" order by default.
Description:
On the Landing page, course tracks are displayed with options to filter by category and sort by various parameters. However, there are several issues with how the tracks are sorted when categories or sorting options are changed.
Steps to Reproduce:
Issue: The tracks do not maintain the "newest first" order after changing the category (latest tracks should appear first by default).
Issue: The tracks appear in random order, and the same sorting option is still selected in the dropdown (here, "descending").
Issue: The "descending" option cannot be re-selected unless another sorting option is chosen first.
Expected Behavior:
Bug Demo:
https://github.com/user-attachments/assets/e534e934-42fb-41e0-aee9-9c8dae13a063