Skip to content
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

Merged
merged 5 commits into from
Jan 18, 2018

Conversation

IlyaSurmay
Copy link
Contributor

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.

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated API documentation.
  • added/updated demos.

@codecov
Copy link

codecov bot commented Jan 3, 2018

Codecov Report

Merging #3384 into development will decrease coverage by 0.08%.
The diff coverage is 64.7%.

Impacted file tree graph

@@              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
Impacted Files Coverage Δ
src/buttons/buttons.module.ts 87.5% <100%> (+1.78%) ⬆️
src/buttons/index.ts 100% <100%> (ø) ⬆️
src/buttons/button-radio-group.directive.ts 52.63% <52.63%> (ø)
src/buttons/button-radio.directive.ts 81.81% <70%> (-15.48%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 446587e...3c2d5b4. Read the comment docs.

selector: '[btnRadioGroup]',
providers: [RADIO_CONTROL_VALUE_ACCESSOR]
})
export class ButtonRadioGroupDirective implements ControlValueAccessor {

This comment was marked as off-topic.


/** 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.

return;
}
if (this.group) {
this.group.onTouched();

This comment was marked as off-topic.

@valorkin valorkin added this to the v2.0.0-rc.2 milestone Jan 5, 2018
@ghost ghost assigned valorkin Jan 12, 2018
@YevheniiaMazur
Copy link

Tested, looks good.

@valorkin valorkin merged commit b2b8bdc into development Jan 18, 2018
@ghost ghost removed the ready for merge label Jan 18, 2018
@valorkin valorkin deleted the fix-radio-reactive branch January 18, 2018 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants