feat: apply declarative render rule across components

This commit is contained in:
2026-11-10 08:04:24 +07:00
parent fbc4f24d16
commit 44abaf47a9
12 changed files with 545 additions and 561 deletions
+4 -5
View File
@@ -274,11 +274,10 @@ where
}
};
let mut row = MenuItem::new(option.label.clone());
if let Some(icon) = option.icon.clone() {
row = row.icon(icon);
}
row.checked(is_selected).handler(handler)
MenuItem::new(option.label.clone())
.when_some(option.icon.clone(), |row, icon| row.icon(icon))
.checked(is_selected)
.handler(handler)
})
.collect()
};