File tree Expand file tree Collapse file tree
src/BootstrapBlazor.Server/Components/Samples/Table Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- @page " /table"
1+ @page " /table"
22@inject IStringLocalizer <NavMenu > NavMenuLocalizer
33@inject IStringLocalizer <Tables > Localizer
44@inject IStringLocalizer <Foo > FooLocalizer
6868<DemoBlock Title =" @Localizer[" TableBaseSizeTitle " ]"
6969 Introduction =" @Localizer[" TableBaseSizeIntro " ]"
7070 Name =" TableSize" >
71- <section ignore >@( (MarkupString )Localizer [" TableBaseSizeDescription" ].Value ) </section >
72- <Table TItem =" Foo" Items =" @Items.Take(3)" IsBordered =" true" IsStriped =" true" TableSize =" TableSize.Compact" >
71+ <section ignore >
72+ <p >@( (MarkupString )Localizer [" TableBaseSizeDescription" ].Value ) </p >
73+ <div class =" row g-3" >
74+ <div class =" col-12 col-sm-6" >
75+ <Switch @bind-Value =" @_isCompact" DisplayText =" TableSize" />
76+ </div >
77+ </div >
78+ </section >
79+ <Table TItem =" Foo" Items =" @Items.Take(3)" IsBordered =" true" IsStriped =" true"
80+ TableSize =" @(_isCompact ? TableSize.Compact : TableSize.Normal)" IsMultipleSelect =" true" >
7381 <TableColumns >
7482 <TableColumn @bind-Field =" @context.DateTime" Width =" 180" Filterable =" true" Sortable =" true" />
7583 <TableColumn @bind-Field =" @context.Name" Filterable =" true" />
Original file line number Diff line number Diff line change 1- // Licensed to the .NET Foundation under one or more agreements.
1+ // Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the Apache 2.0 License
33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -21,6 +21,8 @@ public partial class Tables
2121 [ NotNull ]
2222 private string ? RefreshText { get ; set ; }
2323
24+ private bool _isCompact = true ;
25+
2426 /// <summary>
2527 /// OnInitialized
2628 /// </summary>
You can’t perform that action at this time.
0 commit comments