🚧 Normaliza el uso de los bundles de componentes
This commit is contained in:
parent
b2a7c71c1f
commit
7a6cb4dbfa
9 changed files with 26 additions and 42 deletions
|
|
@ -124,14 +124,12 @@ impl Form {
|
|||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_element(&mut self, element: impl ComponentTrait) -> &mut Self {
|
||||
self.elements.add(element);
|
||||
pub fn with_element(mut self, element: impl ComponentTrait) -> Self {
|
||||
self.elements.alter_bundle(BundleOp::Add, element);
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_bundle(&mut self, op: BundleOp, element: impl ComponentTrait) -> &mut Self {
|
||||
pub fn alter_elements(&mut self, op: BundleOp, element: impl ComponentTrait) -> &mut Self {
|
||||
self.elements.alter_bundle(op, element);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue