Skip to content

Commit 8b2b302

Browse files
committed
Fix checkbox rendering its label unconditionally
1 parent 40d242b commit 8b2b302

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

widget/src/checkbox.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,10 @@ where
439439
}
440440
}
441441

442+
if self.label.is_none() {
443+
return;
444+
}
445+
442446
{
443447
let label_layout = children.next().unwrap();
444448
let state: &widget::text::State<Renderer::Paragraph> =

0 commit comments

Comments
 (0)