|
1 | | -@page "/table/column" |
| 1 | +@page "/table/column" |
2 | 2 | @inject IStringLocalizer<NavMenu> NavMenuLocalizer |
3 | 3 | @inject IStringLocalizer<TablesColumn> Localizer |
4 | 4 | @inject IStringLocalizer<Foo> FooLocalizer |
|
218 | 218 | </Table> |
219 | 219 | </DemoBlock> |
220 | 220 |
|
| 221 | +<DemoBlock Title="@Localizer["ShowMoreButtonTitle"]" Introduction="@Localizer["ShowMoreButtonIntro"]" Name="ShowMoreButton"> |
| 222 | + <section ignore> |
| 223 | + <p>@((MarkupString)Localizer["ShowMoreButtonDesc"].Value)</p> |
| 224 | + <Pre><MoreButtonDropdownTemplate> |
| 225 | + <DropdownItem Text="Action1" Icon="fa-solid fa-flag" OnClick="@@(() => OnAction(context, "Action1"))"></DropdownItem> |
| 226 | + <Divider></Divider> |
| 227 | + <DropdownItem Text="Action2" Icon="fa-solid fa-home" OnClick="@@(() => OnAction(context, "Action2"))"></DropdownItem> |
| 228 | +</MoreButtonDropdownTemplate></Pre> |
| 229 | + </section> |
| 230 | + <Table TItem="Foo" |
| 231 | + IsPagination="true" PageItemsSource="new int[] {10, 20}" |
| 232 | + IsStriped="true" IsBordered="true" ShowMoreButton="true" |
| 233 | + ShowToolbar="true" ShowCardView="true" IsMultipleSelect="true" ShowExtendButtons="true" |
| 234 | + ShowEmpty="true" OnQueryAsync="@OnQueryAsync"> |
| 235 | + <TableColumns> |
| 236 | + <TableColumn @bind-Field="@context.DateTime" Width="180" /> |
| 237 | + <TableColumn @bind-Field="@context.Name" /> |
| 238 | + <TableColumn @bind-Field="@context.Address" /> |
| 239 | + <TableColumn @bind-Field="@context.Education" /> |
| 240 | + </TableColumns> |
| 241 | + <MoreButtonDropdownTemplate> |
| 242 | + <DropdownItem Text="Action1" Icon="fa-solid fa-flag" OnClick="@(() => OnAction(context, "Action1"))"></DropdownItem> |
| 243 | + <Divider></Divider> |
| 244 | + <DropdownItem Text="Action2" Icon="fa-solid fa-home" OnClick="@(() => OnAction(context, "Action2"))"></DropdownItem> |
| 245 | + </MoreButtonDropdownTemplate> |
| 246 | + </Table> |
| 247 | +</DemoBlock> |
| 248 | + |
221 | 249 | <DemoBlock Title="@Localizer["AdvanceTitle"]" Introduction="@Localizer["AdvanceIntro"]" Name="Advance"> |
222 | 250 | <Table TItem="Foo" IsPagination="true" PageItemsSource="@PageItemsSource" RenderMode="TableRenderMode.Table" |
223 | 251 | IsStriped="true" IsBordered="true" OnQueryAsync="OnQueryAsync"> |
|
0 commit comments