Skip to content

Filter Not Applied When Sorting by "Year (New to Old)" — Shows Incorrect Exam Types #496

@thinkter

Description

@thinkter

Describe the bug
When an exam type filter (e.g., FAT) is selected while the papers are sorted by "Year (New to Old)", the filter does not apply correctly. Papers from other exam types (e.g., CAT-1, CAT-2) are still displayed alongside FAT papers, indicating that the filtering logic is either ignored or overridden by the sorting logic.


To Reproduce
Steps to reproduce the behavior:

  1. Go to the Papers page
  2. In the Filters panel, select an exam type (e.g., FAT)
  3. Enable sorting by clicking on "Year (New to Old)"
  4. Observe the list of papers
  5. Notice that papers from other exam types (CAT-1, CAT-2, etc.) are still visible

Expected behavior
Only papers corresponding to the selected exam type (e.g., FAT) should be displayed after applying the filter, regardless of the sorting order.


Screenshots
Attached screenshot shows FAT selected, but papers from CAT-1 and CAT-2 are still visible.
Image


Desktop (please complete the following information):

  • OS: Arch Linux
  • Browser: Firefox
  • Version: 149.0

Smartphone (please complete the following information):
N/A


Additional context
This appears to be an issue with filter and sort state interaction. Likely causes include:

  • Filter state not being reapplied after sorting
  • Sorting logic overriding filtered dataset instead of operating on it
  • UI state reflecting selected filters, but backend/query not respecting them

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions