Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/improve ux of toggle component (#3769)

Thomas Kauld7030886112b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5dc0dc3cd..094b896f94 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Improved the usability of the toggle component
- Switched to the accounts endpoint in the holding detail dialog
## 2.107.1 - 2024-09-12
diff --git a/apps/client/src/app/components/toggle/toggle.component.html b/apps/client/src/app/components/toggle/toggle.component.html
index 4a6e0fc3d9..ac2256daa1 100644
--- a/apps/client/src/app/components/toggle/toggle.component.html
+++ b/apps/client/src/app/components/toggle/toggle.component.html
@@ -7,7 +7,10 @@
<mat-radio-button
class="d-inline-flex"
[disabled]="isLoading"
- [ngClass]="{ 'cursor-pointer': !isLoading }"
+ [ngClass]="{
+ 'cursor-default': option.value === optionFormControl.value,
+ 'cursor-pointer': !isLoading && option.value !== optionFormControl.value
+ }"
[value]="option.value"
>{{ option.label }}</mat-radio-button
>