TanStack / table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table
https://tanstack.com/table
MIT License
24.61k stars 3.04k forks source link

feat: add autoResetSorting #5414

Open tychenjiajun opened 4 months ago

nx-cloud[bot] commented 4 months ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 86a854c9f1cdc543491335fe1748e12825ac3e66. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx affected --targets=test:format,test:sherif,test:knip,test:lib,test:types,build --parallel=3`](https://cloud.nx.app/runs/CGwh2xKqPP?utm_source=pull-request&utm_medium=comment) - [`nx run-many --targets=test:format,test:sherif,test:knip,test:lib,test:types,build --parallel=3`](https://cloud.nx.app/runs/Y0N4bebsvL?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

KevinVandy commented 4 months ago

What's the use-case for this? Usually changing the sorting state without user-input is bad UX, right?

tychenjiajun commented 4 months ago

What's the use-case for this? Usually changing the sorting state without user-input is bad UX, right?

Personally I agree that changing the sorting state without user-input is bad UX. But there's still some designers prefer automatically resetting the sorting state when data changes.

tychenjiajun commented 4 months ago

Also, see https://github.com/TanStack/table/discussions/5217

KevinVandy commented 4 months ago

ok, open to merging this, but need to test more. Definitely agree that this should not be enabled by default like some of the other autoReset options though.