carbon-components-angular icon indicating copy to clipboard operation
carbon-components-angular copied to clipboard

Setting checkbox as disabled in reactive forms results in TypeError

Open anemonetea opened this issue 2 years ago • 2 comments

Detailed description

Screen Shot 2022-08-25 at 11 57 46 AM

Relevant Carbon code: https://github.com/IBM/carbon-components-angular/blob/64010af468042741cf2fc796a94f801d26499d18/src/checkbox/checkbox.component.ts#L315-L318

Steps to reproduce the issue

Codesandbox: https://codesandbox.io/s/carbon-components-angular-checkbox-typeerror-sejsyl?file=/src/app/app.component.html

Additional information

anemonetea avatar Aug 25 '22 16:08 anemonetea

Hey @anemonetea & @r2-codes, have you tried following the example on storybook?

In the demo, we use reactive form & enable/disable checkbox.

Akshat55 avatar Sep 15 '22 22:09 Akshat55

Hey @Akshat55 in my situation, if you are on that tab where the checkbox its is, I can toggle it, its perfect. But when I leave the checkbox on disable state, and return back to the checkbox with the disable state that is the moment when the error occurs. As I understand, when the component is initialized if has disable state there is the problem.

artim-alushi avatar Sep 16 '22 12:09 artim-alushi