From b08ae116c0bd54ccedd22a07385765928db9aaea Mon Sep 17 00:00:00 2001 From: wermeson-lopes-brisa Date: Wed, 18 Oct 2023 14:59:55 -0300 Subject: [PATCH] feat: include source group at radio-group return --- projects/ion/src/lib/core/types/radio-group.ts | 6 ++++++ .../lib/radio-group/radio-group.component.html | 2 +- .../radio-group/radio-group.component.spec.ts | 12 ++++++++---- .../src/lib/radio-group/radio-group.component.ts | 16 ++++++++++------ 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/projects/ion/src/lib/core/types/radio-group.ts b/projects/ion/src/lib/core/types/radio-group.ts index db1175c22..29bd4d834 100644 --- a/projects/ion/src/lib/core/types/radio-group.ts +++ b/projects/ion/src/lib/core/types/radio-group.ts @@ -5,3 +5,9 @@ export interface RadioOptions { value: SafeAny; disabled?: boolean; } + +export interface RadioSelectedOption { + label: string; + value: SafeAny; + groupName: string; +} diff --git a/projects/ion/src/lib/radio-group/radio-group.component.html b/projects/ion/src/lib/radio-group/radio-group.component.html index 2980ffbc8..221761f42 100644 --- a/projects/ion/src/lib/radio-group/radio-group.component.html +++ b/projects/ion/src/lib/radio-group/radio-group.component.html @@ -10,7 +10,7 @@ [value]="option.value" [checked]="value === option.value" [disabled]="option.disabled" - (click)="setValue(option.value)" + (click)="setValue(option)" />