Skip to content

Commit 21e2ca4

Browse files
YomodoJeffrey Janglimckaragoz
authored
MudCombobox: Bugfixes (#297)
* MudCombobox: Bugfixes -Bug origin: HandleOnClick method -Bugfix: NullReferenceException for Value property -Bugfix: ArgumentOutOfRangeException for properItems property Improvements: -Applied some applicable IntelliSense suggestions -Made KeyInterceptorOptions static -Reworked: ToggleOption method -Feature: Pressing ESC while the edit/search box has focus, will now close the menu * Restored global.json * Fixed bug in ActiveFirstItem() --------- Co-authored-by: Jeffrey Jangli <Jeffrey.Jangli@kpn.com> Co-authored-by: Mehmet Can Karagöz <78308169+mckaragoz@users.noreply.github.com>
1 parent 4a6b082 commit 21e2ca4

4 files changed

Lines changed: 164 additions & 176 deletions

File tree

CodeBeam.MudBlazor.Extensions/Components/ComboBox/MudComboBox.razor

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Value="@_searchString" ValueChanged="@HandleInternalValueChanged"
1919
DisableUnderLine="@DisableUnderLine"
2020
Disabled="@Disabled" ReadOnly="@ReadOnly" Error="@Error" ErrorId="@ErrorId"
21-
Clearable="@Clearable" ForceClearable="@(Clearable && HasValue(Value))" OnClearButtonClick="(async (e) => await ClearButtonClickHandlerAsync(e))"
21+
Clearable="@Clearable" ForceClearable="@(Clearable && HasValue(Value))" OnClearButtonClick="@ClearButtonClickHandlerAsync"
2222
@attributes="UserAttributes" OnBlur="@HandleOnBlur" ForceShrink="@(HasValue(Value) || _isOpen || ForceShrink)">
2323

2424
<AdornmentEnd>
@@ -131,7 +131,7 @@
131131
@if (SelectAll)
132132
{
133133
<div class="@($"mud-combobox-item mud-combobox-item-clickable mud-combobox-item-{Dense.ToDescriptionString()} mud-ripple d-flex")" @onclick="SelectAllItems" @onclick:stopPropagation="true">
134-
<MudCheckBox Class="mx-4" @bind-Checked="_allSelected" Color="@Color" @onclick="SelectAllItems" Dense="true" />
134+
<MudCheckBox Class="mx-4" @bind-Checked="@_allSelected" Color="@Color" @onclick="SelectAllItems" Dense="true" />
135135
<MudText Typo="GetTypo()">@SelectAllText</MudText>
136136
</div>
137137
<MudDivider />
@@ -157,6 +157,4 @@
157157

158158
</CascadingValue>
159159
<!-- mousedown instead of click needed to close the menu before OnLostFocus runs -->
160-
<MudOverlay Visible="_isOpen" @onmousedown="@(() => CloseMenu())" LockScroll="@LockScroll" />
161-
162-
160+
<MudOverlay Visible="_isOpen" @onmousedown="@CloseMenu" LockScroll="@LockScroll" />

0 commit comments

Comments
 (0)