StackExchange / StackExchange/Stacks

Default ordering of s-table__sortable

Open
#336 0 comments 1 reaction 0 assignees View on GitHub

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

Additional context
none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.