diff --git a/Components/Daisy/DInputBase.cs b/Components/Daisy/DInputBase.cs index 70604be..25384c0 100644 --- a/Components/Daisy/DInputBase.cs +++ b/Components/Daisy/DInputBase.cs @@ -20,6 +20,12 @@ public abstract class DInputBase : InputBase protected IReadOnlyDictionary InputAttributes => AdditionalAttributes?.Where(a => a.Key != "class").ToDictionary(a => a.Key, a => a.Value); + /// + /// The name attribute, or null so none is rendered. InputBase.NameAttributeValue is "" outside a form that maps + /// field names, which would group every radio and checkbox on the page. + /// + protected string NameAttribute => string.IsNullOrEmpty(NameAttributeValue) ? null : NameAttributeValue; + protected static string Cx(params string[] classes) => DCx.Join(classes); protected override string FormatValueAsString(TValue value) => diff --git a/Components/Daisy/DataInput/DInput.razor b/Components/Daisy/DataInput/DInput.razor index 63233bf..232630c 100644 --- a/Components/Daisy/DataInput/DInput.razor +++ b/Components/Daisy/DataInput/DInput.razor @@ -5,14 +5,14 @@ moves to a wrapping diff --git a/Components/Daisy/DataInput/DRange.razor b/Components/Daisy/DataInput/DRange.razor index 8ea0a4c..a04dc00 100644 --- a/Components/Daisy/DataInput/DRange.razor +++ b/Components/Daisy/DataInput/DRange.razor @@ -3,7 +3,7 @@ @* daisyUI Range: https://daisyui.com/components/range/ . TValue is numeric; Min and Max are always rendered, as daisyUI requires. *@ - diff --git a/Components/Daisy/DataInput/DSelect.razor b/Components/Daisy/DataInput/DSelect.razor index b0671a0..5ee8fe4 100644 --- a/Components/Daisy/DataInput/DSelect.razor +++ b/Components/Daisy/DataInput/DSelect.razor @@ -5,7 +5,7 @@ enums bind by name. With Prefix (an icon or a span.label) the select class moves to a wrapping