gregnb / gregnb/mui-datatables

Sort Column Gets Reset (Server-Side Data)

Open
#1,057 9 comments 1 reaction 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

The sort column direction is getting reset after new data is retrieved from the server and set in the table. It also gets reset on page changes, rows per page changes, and search text changes. Is this intended behavior, and is there any way to override it?

## Expected Behavior
The sort column should not change when new data is retrieved and set from the server.

## Current Behavior
The sort column direction is getting reset after new data is retrieved from the server and set in the table. It also gets reset on page changes, rows per page changes, and search text changes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the server-side table flow and trace how sort state is handled when data, page, rows-per-page, or search text changes. Done means the selected sort column and direction remain unchanged after each of those updates, with the behavior verified against the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.