Include name in Radio

This commit is contained in:
2026-03-31 19:20:13 +02:00
parent 0bdbd70ab3
commit e2f5932810

View File

@@ -3,11 +3,12 @@ import { val, joinClass } from "../core/utils.js";
/** RADIO */ /** RADIO */
export const Radio = (props) => { export const Radio = (props) => {
const { label, tooltip, value, ...rest } = props; const { label, tooltip, value, name, ...rest } = props;
const radioEl = $html("input", { const radioEl = $html("input", {
...rest, ...rest,
type: "radio", type: "radio",
name: name,
class: joinClass("radio", props.class), class: joinClass("radio", props.class),
checked: () => val(value) === props.value, checked: () => val(value) === props.value,
disabled: () => val(props.disabled), disabled: () => val(props.disabled),