File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 3131 </div >
3232</DemoBlock >
3333
34+ <DemoBlock Title =" @Localizer[" DropdownItemTemplateTitle " ]" Introduction =" @Localizer[" DropdownItemTemplateIntro " ]" Name =" ItemTemplate" >
35+ <Dropdown TValue =" string" Items =" ItemTemplateList" >
36+ <ItemTemplate >
37+ <Tooltip Title =" just a tooltip text demo" Trigger =" hover" >
38+ <span class =" fa-solid fa-flag" ></span >
39+ <div class =" ms-2 flex-fill" >@context.Text </div >
40+ </Tooltip >
41+ </ItemTemplate >
42+ </Dropdown >
43+ </DemoBlock >
44+
3445<DemoBlock Title =" @Localizer[" SplitTitle " ]" Introduction =' @Localizer["SplitIntro"]' Name =" Split" >
3546 <div class =" row g-3" >
3647 <div class =" col-6 col-sm-4 col-md-3" >
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public sealed partial class Dropdowns
1818
1919 private List < SelectedItem > Items { get ; set ; } = [ ] ;
2020
21+ private List < SelectedItem > ItemTemplateList { get ; set ; } = [ ] ;
22+
2123 /// <summary>
2224 /// ShowMessage
2325 /// </summary>
@@ -41,6 +43,13 @@ protected override void OnInitialized()
4143 new SelectedItem ( ) { Text = Localizer [ "Item3" ] , Value = "2" } ,
4244 ] ;
4345
46+ ItemTemplateList =
47+ [
48+ new SelectedItem ( ) { Text = Localizer [ "Item1" ] , Value = "0" } ,
49+ new SelectedItem ( ) { Text = Localizer [ "Item2" ] , Value = "1" } ,
50+ new SelectedItem ( ) { Text = Localizer [ "Item3" ] , Value = "2" } ,
51+ ] ;
52+
4453 Foos =
4554 [
4655 new SelectedItem { Text = Localizer [ "Item1" ] , Value = "0" } ,
You can’t perform that action at this time.
0 commit comments