OS-jacobbell · GitHub

Issue: Closes #30632

What is the current behavior?

Checkbox's render function applies the label-text-wrapper-hidden css class when there is no label text to prevent extra margin from being added. The render function is not re-evaluated if the label is updated. This causes a problem in Angular where dynamic variables get applied after the page is loaded, and a checkbox using a variable as a label gets stuck with its label hidden until something else triggers a re-render, e.g. ticking the box.

What is the new behavior?

  • The checkbox will be re-rendered, and css classes will be updated, when the label text is changed.
  • Updated tests to check that the label is visible after changing from blank to having content.

Does this introduce a breaking change?

  • Yes
  • No

Read the original on github.com ↗