StackExchange / StackExchange/Stacks
Default ordering of s-table__sortable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 672
- Forks
- 107
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem? Please describe.
There doesn't seem to be a way to set the default sorting of a s-table__sortable table.
Describe the solution you'd like
I would like to be able to set the default sorting column/direction of a table. The user should be able to interact with the pre-sorted table in the same way as before.
Describe alternatives you've considered
- Datatables https://datatables.net/examples/basic_init/table_sorting.html
- Sorting the dataset before sending to the frontend.
Additional context
none
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the s-table__sortable component and reading how its current sorting state is initialized. Add a way to provide the initial sorting column and direction while preserving the existing interactive sorting behavior, then verify that a pre-sorted table can still be sorted by the user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100