goetzrobin / spartan

Cutting-edge tools powering Angular full-stack development.
https://spartan.ng
MIT License
1.09k stars 120 forks source link

fix(checkbox): update disabled input state when parent form is disabled #313

Closed canserkanuren closed 1 week ago

canserkanuren commented 3 weeks ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

Which package are you modifying?

What is the current behavior?

Currently, when using Reactive Forms, disabling the form doesn't disable the underlying checkbox (or checkboxes if there are plenty of them).

Closes #

What is the new behavior?

When disabling a parent form by using form.disable(), the hlm-checkbox component is now disabled. The checkbox will be enabled if the form becomes enabled again.

Does this PR introduce a breaking change?

Other information

Acutally, I saw that this behavior was ok with the brn-checkbox.component.ts but it was not replicated at the hlm level.