feat: apply declarative render rule across components
This commit is contained in:
@@ -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()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user