diff --git a/Documentation/Blazorise.Docs/Models/Snippets.generated.cs b/Documentation/Blazorise.Docs/Models/Snippets.generated.cs index 7d37ae06d3..d7de5bc60b 100644 --- a/Documentation/Blazorise.Docs/Models/Snippets.generated.cs +++ b/Documentation/Blazorise.Docs/Models/Snippets.generated.cs @@ -1557,6 +1557,13 @@ void OnRememberMeChanged( bool value ) } }"; + public const string CheckWithNameExample = @"Check me out +Check me out too! + +@code{ + string name = ""CheckMeOut""; +}"; + public const string AutoCloseExample = @" I can be closed! diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/CheckPage.razor b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/CheckPage.razor index 45e0eeb39f..05bcc24e47 100644 --- a/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/CheckPage.razor +++ b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/CheckPage.razor @@ -24,6 +24,16 @@ + + + This example showcases two Blazorise checkboxes linked to the same identifier, CheckMeOut. Both checkboxes contribute to the same data field upon submission when included in a form. This setup is ideal for grouping related choices under one name but requires careful data handling to distinguish between the choices on the server side. + + + + + + + Usage @@ -73,4 +83,7 @@ Defines the mouse cursor based on the behavior by the current CSS framework. + + Defines the name attribute of a checkbox. The name attribute is used to identify form data after it has been submitted to the server, or to reference form data using JavaScript on the client side. + \ No newline at end of file diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Code/CheckWithNameExampleCode.html b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Code/CheckWithNameExampleCode.html new file mode 100644 index 0000000000..3b981e637c --- /dev/null +++ b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Code/CheckWithNameExampleCode.html @@ -0,0 +1,11 @@ +
+
+<Check TValue="bool" Name="@name">Check me out</Check>
+<Check TValue="bool" Name="@name">Check me out too!</Check>
+
+
+@code{
+    string name = "CheckMeOut";
+}
+
+
diff --git a/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Examples/CheckWithNameExample.razor b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Examples/CheckWithNameExample.razor new file mode 100644 index 0000000000..e885275712 --- /dev/null +++ b/Documentation/Blazorise.Docs/Pages/Docs/Components/Checks/Examples/CheckWithNameExample.razor @@ -0,0 +1,8 @@ +@namespace Blazorise.Docs.Docs.Examples + +Check me out +Check me out too! + +@code{ + string name = "CheckMeOut"; +} \ No newline at end of file diff --git a/Source/Blazorise.AntDesign/Components/Check.razor b/Source/Blazorise.AntDesign/Components/Check.razor index b2ef92978e..ef807181f6 100644 --- a/Source/Blazorise.AntDesign/Components/Check.razor +++ b/Source/Blazorise.AntDesign/Components/Check.razor @@ -2,7 +2,7 @@ @inherits Blazorise.Check