Skip to content

Commit f857a70

Browse files
authored
fix(radio): remove label part when there's no text in the slot (#1482)
1 parent 2bd65b6 commit f857a70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/radio/radio.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ export default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMix
189189

190190
protected override createRenderRoot() {
191191
const root = super.createRenderRoot();
192+
this.hideLabel = isEmpty(this.label);
193+
192194
root.addEventListener('slotchange', () => {
193195
this.hideLabel = isEmpty(this.label);
194196
});

0 commit comments

Comments
 (0)