♻️ (form): Añade #[builder_fn] a Item y Group
Uniforma el criterio con el resto de elementos de componente (`Row`/ `Cell`/`Column`/`SortLink` en table, `Crumb` en breadcrumb) generando su `alter_...` equivalente para poder mutarse con `&mut self`.
This commit is contained in:
parent
aa8c4100b0
commit
17a9f0c9e0
3 changed files with 8 additions and 0 deletions
|
|
@ -46,12 +46,14 @@ impl Item {
|
|||
///
|
||||
/// Si varias opciones del grupo tienen `checked` activo, sólo la primera se renderizará como
|
||||
/// seleccionada; las demás se ignorarán.
|
||||
#[builder_fn]
|
||||
pub fn with_checked(mut self, checked: bool) -> Self {
|
||||
self.checked = checked;
|
||||
self
|
||||
}
|
||||
|
||||
/// Establece si la opción está inicialmente deshabilitada.
|
||||
#[builder_fn]
|
||||
pub fn with_disabled(mut self, disabled: bool) -> Self {
|
||||
self.disabled = disabled;
|
||||
self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue