-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(buttons): fix radio btns for reactive forms, add radio reactive demo #3384
Conversation
Codecov Report
@@ Coverage Diff @@
## development #3384 +/- ##
==============================================
- Coverage 72.39% 72.3% -0.09%
==============================================
Files 249 250 +1
Lines 8039 8078 +39
Branches 1527 1533 +6
==============================================
+ Hits 5820 5841 +21
- Misses 1795 1809 +14
- Partials 424 428 +4
Continue to review full report at Codecov.
|
selector: '[btnRadioGroup]', | ||
providers: [RADIO_CONTROL_VALUE_ACCESSOR] | ||
}) | ||
export class ButtonRadioGroupDirective implements ControlValueAccessor { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
||
/** Radio button value, will be set to `ngModel` */ | ||
@Input() btnRadio: any; | ||
/** If `true` — radio button can be unchecked */ | ||
@Input() uncheckable: boolean; | ||
/** Current value of radio component or group */ | ||
@Input() value: any; | ||
@Input() get value(): any { | ||
return this.group ? this.group.value : this._value; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
return; | ||
} | ||
if (this.group) { | ||
this.group.onTouched(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
f3f2bd3
to
1ba14cb
Compare
Tested, looks good. |
Fixes #2581
PR Checklist
Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.