Skip to content

fix(tree): use natural numeric sort and trim in sortTreeByName - #38

Open
AlissonAraldi wants to merge 1 commit into
privum-cloud:mainfrom
AlissonAraldi:pr/tree-natural-numeric-sort
Open

AlissonAraldi wants to merge 1 commit into
privum-cloud:mainfrom
AlissonAraldi:pr/tree-natural-numeric-sort

Conversation

@AlissonAraldi

Copy link
Copy Markdown

Summary

In issue #27 / sortTreeByName, localeCompare without { numeric: true } sorts numbered connections lexicographically (e.g. Server 1, Server 10, Server 2).

Changes

  • Updated sortTreeByName in src/lib/tree.ts to use .trim().localeCompare(..., { sensitivity: "base", numeric: true }) so numbered connection lists sort naturally (Server 1, Server 2, ..., Server 10).

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.

1 participant