File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 240240 <div class =" col-12 col-sm-6 align-self-end" >
241241 <div class =" form-control" >@SelectedEnumItem </div >
242242 </div >
243+ <div class =" col-12 col-sm-6" >
244+ <Select @bind-Value =" _enumValueDemo" Items =" _enumValueDemoItems" ShowLabel =" true" DisplayText =" @Localizer[" SelectsEnumSelectText3 " ]" >
245+ </Select >
246+ </div >
247+ <div class =" col-12 col-sm-6 align-self-end" >
248+ <div class =" form-control" >@_enumValueDemo </div >
249+ </div >
243250 </div >
244251</DemoBlock >
245252
Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ public sealed partial class Selects
5151
5252 private string ? _fooName ;
5353
54+ private List < SelectedItem > _enumValueDemoItems = [
55+ new ( "0" , "Primary" ) ,
56+ new ( "1" , "Middle" )
57+ ] ;
58+
59+ private EnumEducation _enumValueDemo = EnumEducation . Primary ;
60+
5461 /// <summary>
5562 /// <inheritdoc/>
5663 /// </summary>
@@ -69,7 +76,7 @@ private async Task<QueryData<SelectedItem>> OnQueryAsync(VirtualizeQueryOption o
6976 var items = Foos ;
7077 if ( ! string . IsNullOrEmpty ( option . SearchText ) )
7178 {
72- items = Foos . Where ( i => i . Name ! . Contains ( option . SearchText , StringComparison . OrdinalIgnoreCase ) ) . ToList ( ) ;
79+ items = [ .. Foos . Where ( i => i . Name ! . Contains ( option . SearchText , StringComparison . OrdinalIgnoreCase ) ) ] ;
7380 }
7481 return new QueryData < SelectedItem >
7582 {
You can’t perform that action at this time.
0 commit comments