diff --git a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/DropdownDocumentation.razor b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/DropdownDocumentation.razor
index ccdbf42e9..fa0ccd227 100644
--- a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/DropdownDocumentation.razor
+++ b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/DropdownDocumentation.razor
@@ -56,9 +56,13 @@
- To style DropdownItem as disabled, add the Disabled="true"
parameter to the DropdownItem element in the DropdownMenu component.
+ To disable the dropdown, set the Disabled parameter to true on the Dropdown component.
-
+
+
+ To style a dropdown item as disabled, set the Disabled parameter to true on the DropdownItem element in the DropdownMenu component.
+
+
diff --git a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_A_Sizing.razor b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_A_Sizing.razor
index 91f5aee69..d4bb5669f 100644
--- a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_A_Sizing.razor
+++ b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_A_Sizing.razor
@@ -1,15 +1,15 @@
-
- Large button
+
+ Large button
Action
Another action
Something else here
-
- Large split button
-
+
+ Large split button
+
Action
Another action
diff --git a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_B_Sizing.razor b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_B_Sizing.razor
index 78ef2d4ea..d06e3bb71 100644
--- a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_B_Sizing.razor
+++ b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_04_B_Sizing.razor
@@ -1,15 +1,15 @@
-
- Small button
+
+ Small button
Action
Another action
Something else here
-
- Small split button
-
+
+ Small split button
+
Action
Another action
diff --git a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_A_Disabled.razor b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_A_Disabled.razor
new file mode 100644
index 000000000..47bc0e1fa
--- /dev/null
+++ b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_A_Disabled.razor
@@ -0,0 +1,19 @@
+
+ Dropstart
+
+ Action
+ Another action
+ Something else here
+
+
+
+
+ Enable
+ Disable
+
+@code
+{
+ private bool isDropdownDisabled = true;
+ private void EnableDropdown() => isDropdownDisabled = false;
+ private void DisableDropdown() => isDropdownDisabled = true;
+}
diff --git a/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_Disabled.razor b/BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_B_Disabled.razor
similarity index 100%
rename from BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_Disabled.razor
rename to BlazorBootstrap.Demo.RCL/Pages/Dropdowns/Dropdown_Demo_07_B_Disabled.razor
diff --git a/blazorbootstrap/Components/Dropdown/Dropdown.razor b/blazorbootstrap/Components/Dropdown/Dropdown.razor
index 883bafa4d..d2620fe1f 100644
--- a/blazorbootstrap/Components/Dropdown/Dropdown.razor
+++ b/blazorbootstrap/Components/Dropdown/Dropdown.razor
@@ -1,12 +1,16 @@
@namespace BlazorBootstrap
@inherits BlazorBootstrapComponentBase
-
-
-
-
- @ChildContent
-
+
+
+
+
+
+
+ @ChildContent
+
+
+
-
\ No newline at end of file
+
diff --git a/blazorbootstrap/Components/Dropdown/Dropdown.razor.cs b/blazorbootstrap/Components/Dropdown/Dropdown.razor.cs
index 21a7f61c6..77c5dba43 100644
--- a/blazorbootstrap/Components/Dropdown/Dropdown.razor.cs
+++ b/blazorbootstrap/Components/Dropdown/Dropdown.razor.cs
@@ -102,11 +102,17 @@ protected override void OnInitialized()
public RenderFragment ChildContent { get; set; } = default!;
///
- /// Gets or sets the dropdown direction.
+ /// Gets or sets the direction of the dropdown menu.
///
[Parameter]
public DropdownDirection Direction { get; set; } = DropdownDirection.Dropdown;
+ ///
+ /// Gets or sets whether the dropdown menu is disabled.
+ ///
+ [Parameter]
+ public bool Disabled { get; set; }
+
///
/// This event is fired when an dropdown element has been hidden from the user (will wait for CSS transitions to complete).
///
@@ -132,6 +138,12 @@ protected override void OnInitialized()
[Parameter]
public EventCallback OnShown { get; set; }
+ ///
+ /// Gets or sets the size of the .
+ ///
+ [Parameter]
+ public Size Size { get; set; }
+
///
/// Gets or sets the toggle button split behavior.
///
diff --git a/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor b/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor
index 080561ad1..796bc6efd 100644
--- a/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor
+++ b/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor
@@ -1,6 +1,11 @@
@namespace BlazorBootstrap
@inherits BlazorBootstrapComponentBase
-
+
@ChildContent
\ No newline at end of file
diff --git a/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor.cs b/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor.cs
index 8d5a7e0c0..23b11da60 100644
--- a/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor.cs
+++ b/blazorbootstrap/Components/Dropdown/DropdownActionButton.razor.cs
@@ -60,9 +60,15 @@ public ButtonColor Color
}
///
- /// Changes the size of a button.
+ /// Gets or sets the disabled.
///
- [Parameter]
+ [CascadingParameter(Name = "Disabled")]
+ public bool Disabled { get; set; }
+
+ ///
+ /// Gets or sets the size of the .
+ ///
+ [CascadingParameter(Name = "Size")]
public Size Size
{
get => size;
diff --git a/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor b/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor
index 080561ad1..796bc6efd 100644
--- a/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor
+++ b/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor
@@ -1,6 +1,11 @@
@namespace BlazorBootstrap
@inherits BlazorBootstrapComponentBase
-
+
@ChildContent
\ No newline at end of file
diff --git a/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor.cs b/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor.cs
index c318402fe..d8a02f9bb 100644
--- a/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor.cs
+++ b/blazorbootstrap/Components/Dropdown/DropdownToggleButton.razor.cs
@@ -99,9 +99,15 @@ public ButtonColor Color
}
///
- /// Gets or sets the button size.
+ /// Gets or sets the disabled.
///
- [Parameter]
+ [CascadingParameter(Name = "Disabled")]
+ public bool Disabled { get; set; }
+
+ ///
+ /// Gets or sets the size of the .
+ ///
+ [CascadingParameter(Name = "Size")]
public Size Size
{
get => size;
diff --git a/docs/docs/05-components/dropdown.md b/docs/docs/05-components/dropdown.md
index 7ab676f4a..9ee00f64b 100644
--- a/docs/docs/05-components/dropdown.md
+++ b/docs/docs/05-components/dropdown.md
@@ -21,7 +21,9 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
| AutoClose | bool | Enables or disables the auto close. | | true | 1.10.0 |
| AutoCloseBehavior | `DropdownAutoCloseBehavior` | Gets or sets the auto close behavior of the dropdown. | | `DropdownAutoCloseBehavior.Both` | 1.10.0 |
| ChildContent | RenderFragment | Specifies the content to be rendered inside the Dropdown. | | | 1.10.0 |
-| Direction | `DropdownDirection` | Gets or sets the dropdown direction. | | `DropdownDirection.Dropdown` | 1.10.0 |
+| Direction | `DropdownDirection` | Gets or sets the direction of the dropdown menu. | | `DropdownDirection.Dropdown` | 1.10.0 |
+| Disabled | bool | Gets or sets whether the dropdown menu is disabled. | | false | 1.10.3 |
+| Size | `Size` | Gets or sets the size of the dropdown. | | `Size.None` | 1.10.3 |
| Split | bool | Gets or sets the toggle button split behavior. | | false | 1.10.0 |
## DropdownToggleButton Parameters
@@ -30,7 +32,6 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
|:--|:--|:--|:--|:--|:--|
| ChildContent | RenderFragment | Specifies the content to be rendered inside the DropdownToggleButton. | | | 1.10.0 |
| Color | `ButtonColor` | Gets or sets the button color. | | | 1.10.0 |
-| Size | `Size` | Gets or sets the button size. | | | 1.10.0 |
| TabIndex | `int?` | If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. | | | 1.10.0 |
## DropdownActionButton Parameters
@@ -39,7 +40,6 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
|:--|:--|:--|:--|:--|:--|
| ChildContent | RenderFragment | Specifies the content to be rendered inside the DropdownActionButton. | | | 1.10.0 |
| Color | `ButtonColor` | Gets or sets the button color. | | | 1.10.0 |
-| Size | `Size` | Gets or sets the button size. | | | 1.10.0 |
| TabIndex | `int?` | If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. | | | 1.10.0 |
## DropdownMenu Parameters
@@ -108,7 +108,7 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
-```cshtml {} showLineNumbers
+```cshtml {3,11,19,27,35,43} showLineNumbers
Primary
@@ -167,7 +167,7 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
-```cshtml {} showLineNumbers
+```cshtml {3-4,12-13,21-22,30-31,39-40,48-49} showLineNumbers
Primary
@@ -232,19 +232,19 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
-```cshtml {} showLineNumbers
+```cshtml {2,10} showLineNumbers
-
- Large button
+
+ Large button
Action
Another action
Something else here
-
- Large split button
-
+
+ Large split button
+
Action
Another action
@@ -256,19 +256,19 @@ They are toggled by clicking, not by hovering; this is an intentional design dec
-```cshtml {} showLineNumbers
+```cshtml {2,10} showLineNumbers
-
- Small button
+
+ Small button
Action
Another action
Something else here
-
- Small split button
-
+
+ Small split button
+
Action
Another action
@@ -288,7 +288,7 @@ To trigger **DropdownMenu** above elements, add the `Direction="DropdownDirectio
-```cshtml {} showLineNumbers
+```cshtml {2,10} showLineNumbers
Dropup button with text
@@ -318,7 +318,7 @@ To center the DropdownMenu above the toggle, add the Direction="DropdownDirectio
-```cshtml {} showLineNumbers
+```cshtml {2} showLineNumbers
Centered dropup
@@ -339,7 +339,7 @@ To trigger DropdownMenu at the right of elements, add the Direction="DropdownDir
-```cshtml {} showLineNumbers
+```cshtml {2,10} showLineNumbers
Dropend
@@ -369,7 +369,7 @@ To trigger DropdownMenu at the left of elements, you can add the Direction="Drop
-```cshtml {} showLineNumbers
+```cshtml {2,10} showLineNumbers
Dropstart
@@ -399,7 +399,7 @@ To style DropdownItem as active, add the Active="true" parameter to the Dropdown
-```cshtml {} showLineNumbers
+```cshtml {5} showLineNumbers
Dropstart
@@ -414,11 +414,37 @@ To style DropdownItem as active, add the Active="true" parameter to the Dropdown
### Disabled
-To style DropdownItem as disabled, add the Disabled="true" parameter to the DropdownItem element in the DropdownMenu component.
+To disable the dropdown, set the Disabled parameter to true on the Dropdown component.
-
+
-```cshtml {} showLineNumbers
+```cshtml {1} showLineNumbers
+
+ Dropstart
+
+ Action
+ Another action
+ Something else here
+
+
+
+
+ Enable
+ Disable
+
+@code
+{
+ private bool isDropdownDisabled = true;
+ private void EnableDropdown() => isDropdownDisabled = false;
+ private void DisableDropdown() => isDropdownDisabled = true;
+}
+```
+
+To style a dropdown item as disabled, set the Disabled parameter to true on the DropdownItem element in the DropdownMenu component.
+
+
+
+```cshtml {5} showLineNumbers
Dropstart
@@ -439,7 +465,7 @@ To right-align a DropdownMenu, add the Position="DropdownMenuPosition.End" param
-```cshtml {} showLineNumbers
+```cshtml {3} showLineNumbers
Right-aligned menu example
@@ -460,7 +486,7 @@ Add a header to label sections of actions in any dropdown menu.
-```cshtml {} showLineNumbers
+```cshtml {4} showLineNumbers
Dropdown
@@ -480,7 +506,7 @@ Separate groups of related menu items with a divider.
-```cshtml {} showLineNumbers
+```cshtml {7} showLineNumbers
Dropdown
@@ -501,7 +527,7 @@ Place any freeform text within a dropdown menu with text and use spacing utiliti
-```cshtml {} showLineNumbers
+```cshtml {3-6} showLineNumbers
Dropdown
@@ -519,7 +545,7 @@ Put a form within a dropdown menu, or make it into a dropdown menu, and use marg
-```cshtml {} showLineNumbers
+```cshtml {4-14,20-47} showLineNumbers
@using System.ComponentModel.DataAnnotations