You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(checkbox): margin for empty checkboxes incorrectly added (#4730)
* fix(checkbox): margin for empty checkboxes incorrectly added
With #2121 the margin will be removed for checkboxes that don't have any label set.
A problem is that the Checkbox uses the OnPush change detection strategy and therefore the checkbox is not able to detect any delayed / async label change.
This means that checkboxes that set their label from an async binding will not have any margin until the users clicks on the checkbox.
Using the `cdkObserveContent` seems to be an elegant approach when using the OnPush strategy.
The `:empty` CSS selector would be more elegant but it's very sensitive about whitespaces and therefore it doesn't work properly.
Fixes#4720
* Updates
0 commit comments