Skip to content

fixed sorting-function error#199

Merged
its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
Neeraj-gagat:fix/#185-Sorting-function
Nov 17, 2025
Merged

fixed sorting-function error#199
its-me-abhishek merged 1 commit intoCCExtractor:mainfrom
Neeraj-gagat:fix/#185-Sorting-function

Conversation

@Neeraj-gagat
Copy link
Copy Markdown
Contributor

@Neeraj-gagat Neeraj-gagat commented Nov 17, 2025

Description

This PR resolves an issue where sorting by status or ID stopped working whenever any filters (tags, projects, or status) were applied.
The filtering useEffect was always overwriting tempTasks with a fixed ID-sorted list, causing the user’s selected sort order to be lost.

What Was Happening

-Sorting worked correctly at first.
-After applying any filter, the filter useEffect would run.
-This effect reset tempTasks using sortTasksById(filteredTasks, 'desc'), ignoring the selected sort order.
-As a result, sorting became unresponsive when filters were active.

What This PR Changes

-Removed the forced sorting inside the filtering useEffect.
-Filtering now only filters the tasks and does not override the user’s sort order.

Sorting by ID and Status now works correctly even after applying:
-Tag filters
-Project filters
-Status filters

- Fixes: #185

After fix
Screencast from 17-11-25 08:28:44 PM IST.webm

@its-me-abhishek its-me-abhishek merged commit 0da3ac7 into CCExtractor:main Nov 17, 2025
4 checks passed
ShivaGupta-14 pushed a commit to ShivaGupta-14/ccsync that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Sorting Functions (Sort by ID, Status, etc.)

2 participants