File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1313 <ConsoleLogger @ref =" Logger" />
1414</DemoBlock >
1515
16+ <DemoBlock Title =" @Localizer[" RadiosAutoSelectFirstWhenValueIsNullTitle " ]"
17+ Introduction =" @Localizer[" RadiosAutoSelectFirstWhenValueIsNullIntro " ]"
18+ Name =" AutoSelectFirstWhenValueIsNull" >
19+ <RadioList TValue =" string" Items =" @AutoSelectValues" AutoSelectFirstWhenValueIsNull =" false" />
20+ </DemoBlock >
21+
1622<DemoBlock Title =" @Localizer[" RadiosDisableTitle " ]"
1723 Introduction =' @Localizer["RadiosDisableIntro"]'
1824 Name =" Disable" >
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ public sealed partial class Radios
1616 [ NotNull ]
1717 private IEnumerable < SelectedItem > ? DemoValues { get ; set ; }
1818
19+ [ NotNull ]
20+ private IEnumerable < SelectedItem > ? AutoSelectValues { get ; set ; }
21+
1922 [ NotNull ]
2023 private IEnumerable < SelectedItem > ? DisableValues { get ; set ; }
2124
@@ -70,6 +73,12 @@ protected override void OnInitialized()
7073 new ( "2" , Localizer [ "RadiosItem2" ] )
7174 } ;
7275
76+ AutoSelectValues = new List < SelectedItem > ( 2 )
77+ {
78+ new ( "1" , Localizer [ "RadiosItem1" ] ) ,
79+ new ( "2" , Localizer [ "RadiosItem2" ] )
80+ } ;
81+
7382 DisableValues = new List < SelectedItem > ( 2 )
7483 {
7584 new ( "1" , Localizer [ "RadiosItem1" ] ) ,
@@ -177,6 +186,14 @@ private AttributeItem[] GetAttributes() =>
177186 Type = "IEnumerable<TItem>" ,
178187 ValueList = " — " ,
179188 DefaultValue = "—"
189+ } ,
190+ new ( )
191+ {
192+ Name = "AutoSelectFirstWhenValueIsNull" ,
193+ Description = Localizer [ "RadiosAutoSelectFirstWhenValueIsNull" ] ,
194+ Type = "bool" ,
195+ ValueList = "true|false" ,
196+ DefaultValue = "true"
180197 }
181198 ] ;
182199
You can’t perform that action at this time.
0 commit comments