We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c63c912 commit 628ef85Copy full SHA for 628ef85
src/SimpleBlazorMultiselect/SimpleMultiselect.razor
@@ -9,7 +9,8 @@
9
<button class="simple-dropdown-button btn dropdown-toggle" type="button"
10
id="@Id"
11
@onclick="ToggleDropdown"
12
- aria-expanded="@IsDropdownOpen">
+ aria-expanded="@IsDropdownOpen"
13
+ disabled="@Disabled">
14
<span class="simple-dropdown-text">
15
@if (SelectedOptions.Count == 0)
16
{
@@ -69,8 +70,15 @@
69
70
_dotNetHelper = DotNetObjectReference.Create(this);
71
}
72
73
+ protected override async Task OnParametersSetAsync()
74
+ {
75
+ if (Disabled && IsDropdownOpen)
76
+ await CloseDropdown();
77
+ }
78
+
79
private async Task ToggleDropdown()
80
81
+ if (Disabled) return;
82
IsDropdownOpen = !IsDropdownOpen;
83
if (IsDropdownOpen)
84
0 commit comments