File tree Expand file tree Collapse file tree
CodeBeam.MudBlazor.Extensions/Components/ListExtended Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 {
3232 <MudCheckBox CheckedIcon =" @SelectAllCheckBoxIcon" Color =" @Color" @bind-Value =" _allSelected" @onclick =" () => SelectAllItems(_allSelected)" Dense =" true" />
3333 }
34- <MudTextField T =" string" @ref =" _searchField" @bind-Value:get = " _searchString " @bind-Value:set = " SearchChanged " Class =" @ClassSearchBox" Placeholder =" @SearchBoxPlaceholder" OnKeyDown =" SearchBoxHandleKeyDownAsync" OnKeyUp =" @(() => UpdateSelectedStyles())" OnClearButtonClick =" @(() => UpdateSelectedStyles())" Immediate =" true" Variant =" SearchBoxVariant" Margin =" Margin.Dense"
34+ <MudTextField T =" string" @ref =" _searchField" @bind-Value = " SearchString " Class =" @ClassSearchBox" Placeholder =" @SearchBoxPlaceholder" OnKeyDown =" SearchBoxHandleKeyDownAsync" OnKeyUp =" @(() => UpdateSelectedStyles())" OnClearButtonClick =" @(() => UpdateSelectedStyles())" Immediate =" true" Variant =" SearchBoxVariant" Margin =" Margin.Dense"
3535 Adornment =" SearchBoxAdornment" AdornmentIcon =" @Icons.Material.Filled.Search" AdornmentColor =" Color" AutoFocus =" @SearchBoxAutoFocus" Clearable =" @SearchBoxClearable" />
3636 </div >
3737 </MudListSubheaderExtended >
Original file line number Diff line number Diff line change @@ -226,6 +226,22 @@ public IEqualityComparer<T?>? Comparer
226226 [ Category ( CategoryTypes . List . Behavior ) ]
227227 public string ? SearchBoxPlaceholder { get ; set ; }
228228
229+ /// <summary>
230+ /// The string used to search the list of items
231+ /// </summary>
232+ [ Parameter ]
233+ [ Category ( CategoryTypes . List . Behavior ) ]
234+ public string ? SearchString
235+ {
236+ get => _searchString ;
237+ set
238+ {
239+ if ( _searchString == value )
240+ return ;
241+ SearchChanged ( value ) . CatchAndLog ( ) ;
242+ }
243+ }
244+
229245 /// <summary>
230246 /// Fired when the search value changes.
231247 /// </summary>
You can’t perform that action at this time.
0 commit comments