diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7b34022..31ebe5ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Improved the sorting to be case-insensitive in the account selector component + ## 3.55.0 - 2026-08-19 ### Added diff --git a/libs/ui/src/lib/account-selector/account-selector.component.html b/libs/ui/src/lib/account-selector/account-selector.component.html index 3fd21e58a..0ba679706 100644 --- a/libs/ui/src/lib/account-selector/account-selector.component.html +++ b/libs/ui/src/lib/account-selector/account-selector.component.html @@ -28,7 +28,7 @@ } - @for (account of accounts(); track account.id) { + @for (account of sortedAccounts(); track account.id) {
{ + return [...this.accounts()].sort((a, b) => { + return (a.name ?? '') + .toLowerCase() + .localeCompare((b.name ?? '').toLowerCase()); + }); + }); + private readonly ngControl = inject(NgControl, { optional: true, self: true