mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
feat(radio-group): add helperText and errorText properties (#30222)
Issue number: N/A --------- ## What is the current behavior? Radio group does not support helper and error text. ## What is the new behavior? Adds support for helper and error text. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information - [Supporting Text: Preview](https://ionic-framework-git-rou-11554-ionic1.vercel.app/src/components/radio-group/test/supporting-text) --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
This commit is contained in:
@ -52,6 +52,13 @@ export class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDes
|
||||
if (el === this.elementRef.nativeElement) {
|
||||
this.onTouched();
|
||||
setIonicClasses(this.elementRef);
|
||||
|
||||
// When ion-radio is blurred, el and this.elementRef.nativeElement are
|
||||
// different so we need to check if the closest ion-radio-group is the same
|
||||
// as this.elementRef.nativeElement and if so, we need to mark the radio group
|
||||
// as touched
|
||||
} else if (el.closest('ion-radio-group') === this.elementRef.nativeElement) {
|
||||
this.onTouched();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user