File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
BootstrapBlazor.Server/Components/Samples/Table
BootstrapBlazor/Components/Table Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 4545 Introduction =" @Localizer[" AllowResizingIntro " ]"
4646 Name =" AllowResizing" >
4747 <section ignore class =" mb-3" >@( (MarkupString )Localizer [" AllowResizingDesc" ].Value ) </section >
48- <Table TItem =" Foo"
48+ <Table TItem =" Foo" IsFixedHeader = " true "
4949 IsPagination =" true" PageItemsSource =" @PageItemsSource"
5050 AllowResizing =" true" ClientTableName =" table-test"
5151 IsStriped =" true" IsBordered =" true" RenderMode =" TableRenderMode.Table"
Original file line number Diff line number Diff line change @@ -832,9 +832,16 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
832832
833833 private int ? _localStorageTableWidth ;
834834
835- private string ? GetTableStyleString ( bool hasHeader ) => hasHeader && _localStorageTableWidth . HasValue
836- ? $ "width: { _localStorageTableWidth . Value } px;"
837- : null ;
835+ private string ? GetTableStyleString ( bool hasHeader )
836+ {
837+ string ? ret = null ;
838+ if ( _localStorageTableWidth . HasValue )
839+ {
840+ var width = hasHeader ? _localStorageTableWidth . Value : _localStorageTableWidth . Value - 6 ;
841+ ret = $ "width: { width } px;";
842+ }
843+ return ret ;
844+ }
838845
839846 private string ? GetTableName ( bool hasHeader ) => hasHeader ? ClientTableName : null ;
840847
You can’t perform that action at this time.
0 commit comments