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): use disabled state from a control #828

Closed

Conversation

maxokorokov
Copy link
Member

Adds the .disabled class on the label and disabled attribute on the input of radios in case form control becomes disabled.

Fixes #805

@@ -312,11 +316,35 @@ describe('ngbRadioGroup', () => {
expect(getGroupElement(fixture.nativeElement)).toHaveCssClass('ng-valid');
expect(getGroupElement(fixture.nativeElement)).not.toHaveCssClass('ng-invalid');
});

it('should disable label and input when it is disabled using reactive forms', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a test for template-driven forms? I know that the current implementation should work, but better to be safe than sorry...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amended the test for template-driven forms

@pkozlowski-opensource
Copy link
Member

LGTM but I would be even more happy if we could have a test for template-driven forms :-)

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.

None yet

2 participants