File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 4343</DemoBlock >
4444
4545<DemoBlock Title =" @Localizer[" DropdownItemsTemplateTitle " ]" Introduction =" @Localizer[" DropdownItemsTemplateIntro " ]"
46- Name =" ItemTemplate " >
47- <Dropdown TValue =" string" Items = " ItemTemplateList " >
46+ Name =" ItemsTemplate " >
47+ <Dropdown TValue =" string" IsFixedButtonText = " true " FixedButtonText = " More " Icon = " fa solid fa-ellipsis " >
4848 <ItemsTemplate >
49- <DropdownItem Text =" Copy" Icon =" fa-solid fa-copy" ></DropdownItem >
50- <DropdownItem Text =" Paste" Icon =" fa-solid fa-paste" ></DropdownItem >
49+ <DropdownItem Text =" Copy" Icon =" fa-solid fa-copy" OnClick = " @(() => OnClickAction( " Copy " )) " ></DropdownItem >
50+ <DropdownItem Text =" Paste" Icon =" fa-solid fa-paste" OnClick = " @(() => OnClickAction( " Paste " )) " ></DropdownItem >
5151 <DropdownDivider ></DropdownDivider >
52- <DropdownItem Text =" Action1" Icon =" fa-solid fa-flag" ></DropdownItem >
52+ <DropdownItem Text =" Action1" Icon =" fa-solid fa-flag" OnClick = " @(() => OnClickAction( " Action1 " )) " ></DropdownItem >
5353 <DropdownItem >
5454 <Tooltip Title =" just a tooltip text demo" Trigger =" hover" >
5555 <span class =" fa-solid fa-flag" ></span >
56- <div class =" ms-2 flex-fill" >Action2</div >
56+ <div class =" ms-2 flex-fill" @onclick = " @(() => OnClickAction( " Action2 " )) " >Action2</div >
5757 </Tooltip >
5858 </DropdownItem >
5959 </ItemsTemplate >
Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ private async Task OnIsAsyncClick()
163163 await ToastService . Success ( "Dropdown IsAsync" , "Job done!" ) ;
164164 }
165165
166+ private Task OnClickAction ( string actionName ) => ToastService . Information ( "Custom Action" , $ "Trigger { actionName } ") ;
167+
166168 /// <summary>
167169 /// GetAttributes
168170 /// </summary>
You can’t perform that action at this time.
0 commit comments