same as for the checkbox field in commit:
a3361fc (widget: checkbox: make clickable area react to clicks)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
)
.attribute("role", "checkbox")
.attribute("aria-checked", checked.then(|| "true"))
- .onkeyup(onkeyup)
- .onclick(onclick);
+ .onkeyup(onkeyup);
if let Err(msg) = &valid {
checkbox.set_tip(msg.clone())
}
if props.switch {
- checkbox.into()
+ checkbox.onclick(onclick).into()
} else {
Container::new()
.class("pwt-checkbox-state")
+ .onclick(onclick)
.with_child(checkbox)
.into()
}