Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/improve sorting in account selector component (#7670)
Thomas Kaul89ae246f85ab
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex eb7b340222..31ebe5ce27 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### Addeddiff --git a/libs/ui/src/lib/account-selector/account-selector.component.html b/libs/ui/src/lib/account-selector/account-selector.component.htmlindex 3fd21e58a6..0ba6797064 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 @@<mat-option [value]="null" />}- @for (account of accounts(); track account.id) {+ @for (account of sortedAccounts(); track account.id) {<mat-option [value]="account.id"><div class="d-flex"><gf-entity-logodiff --git a/libs/ui/src/lib/account-selector/account-selector.component.ts b/libs/ui/src/lib/account-selector/account-selector.component.tsindex 819abbf921..06c179108d 100644--- a/libs/ui/src/lib/account-selector/account-selector.component.ts+++ b/libs/ui/src/lib/account-selector/account-selector.component.ts@@ -61,6 +61,14 @@ export class GfAccountSelectorComponent});});+ public readonly sortedAccounts = computed(() => {+ return [...this.accounts()].sort((a, b) => {+ return (a.name ?? '')+ .toLowerCase()+ .localeCompare((b.name ?? '').toLowerCase());+ });+ });+private readonly ngControl = inject(NgControl, {optional: true,self: true