File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
CodeBeam.MudBlazor.Extensions/Components/ComboBox
ComponentViewer.Docs/Pages/Examples Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ public MudComboBox()
7070 [ Category ( CategoryTypes . FormComponent . Appearance ) ]
7171 [ Parameter ] public bool Editable { get ; set ; }
7272
73+ /// <summary>
74+ /// If true, all items are eligible regarding what user search in textfield. Default is false.
75+ /// </summary>
76+ [ Category ( CategoryTypes . FormComponent . Appearance ) ]
77+ [ Parameter ] public bool DisableFilter { get ; set ; } = false ;
78+
7379 /// <summary>
7480 /// If true, searched text has highlight.
7581 /// </summary>
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ protected internal void CheckEligible()
153153
154154 protected bool IsEligible ( )
155155 {
156- if ( MudComboBox == null || MudComboBox . Editable == false )
156+ if ( MudComboBox == null || MudComboBox . Editable == false || MudComboBox . DisableFilter == true )
157157 {
158158 return true ;
159159 }
Original file line number Diff line number Diff line change 44<MudGrid >
55 <MudItem xs =" 12" sm =" 8" Class =" d-flex gap-4 align-center justify-center" >
66 <MudComboBox @bind-Value =" @_value" @bind-Text =" @_text" @bind-SelectedValues =" @_selectedValues" Variant =" Variant.Filled" Label =" Highlighted" Editable =" true" MultiSelection =" @_multiselection"
7- autocomplete =" new-password" Color =" _color" Clearable =" _clearable" Strict =" _strict" Highlight =" true" HighlightClass =" @(_customHighlightClass ? " mud-theme-primary " : null)" >
7+ autocomplete =" new-password" Color =" _color" Clearable =" _clearable" Strict =" _strict" Highlight =" true" HighlightClass =" @(_customHighlightClass ? " mud-theme-primary " : null)" DisableFilter = " _disableFilter " >
88 <MudComboBoxItem Value =" @(" Foo " )" >Foo</MudComboBoxItem >
99 <MudComboBoxItem Value =" @(" Bar " )" >Bar</MudComboBoxItem >
1010 <MudComboBoxItem Value =" @(" Fizz " )" >Fizz</MudComboBoxItem >
1616 </MudComboBox >
1717
1818 <MudComboBox @bind-Value =" @_value" @bind-Text =" @_text" @bind-SelectedValues =" @_selectedValues" Variant =" Variant.Filled" Label =" With NoItemsContent" Editable =" true" MultiSelection =" @_multiselection"
19- autocomplete =" new-password" Color =" _color" Clearable =" _clearable" Strict =" _strict" >
19+ autocomplete =" new-password" Color =" _color" Clearable =" _clearable" Strict =" _strict" DisableFilter = " _disableFilter " >
2020 <ChildContent >
2121 <MudComboBoxItem Value =" @(" Foo " )" >Foo</MudComboBoxItem >
2222 <MudComboBoxItem Value =" @(" Bar " )" >Bar</MudComboBoxItem >
4141 <MudSwitchM3 @bind-Checked =" @_strict" Label =" Strict" Color =" Color.Secondary" />
4242 <MudSwitchM3 @bind-Checked =" @_clearable" Label =" Clearable" Color =" Color.Secondary" />
4343 <MudSwitchM3 @bind-Checked =" @_customHighlightClass" Label =" Custom Highlight" Color =" Color.Secondary" />
44+ <MudSwitchM3 @bind-Checked =" @_disableFilter" Label =" Disable Filter" Color =" Color.Secondary" />
4445 </MudStack >
4546 </MudItem >
4647</MudGrid >
5657 bool _clearable ;
5758 bool _strict ;
5859 bool _customHighlightClass ;
60+ bool _disableFilter = false ;
5961
6062 private string [] states =
6163 {
You can’t perform that action at this time.
0 commit comments