💥 Introduce ComponentRef to add comp's to packs
This commit is contained in:
parent
df2d15a839
commit
0a95f3d51c
12 changed files with 106 additions and 103 deletions
|
|
@ -244,12 +244,12 @@ impl MegaMenu {
|
|||
}
|
||||
|
||||
pub fn with_item(mut self, item: MegaMenuItem) -> Self {
|
||||
self.items.alter_pack(PackOp::Add, item);
|
||||
self.items.alter(PackOp::Add, ComponentRef::to(item));
|
||||
self
|
||||
}
|
||||
|
||||
pub fn alter_items(&mut self, op: PackOp, item: MegaMenuItem) -> &mut Self {
|
||||
self.items.alter_pack(op, item);
|
||||
self.items.alter(op, ComponentRef::to(item));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue