File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/BootstrapBlazor/Components/Table Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 198198 }
199199
200200 <RenderTemplate OnRenderAsync =" OnTableRenderAsync" >
201- <div class =" @WrapperClassName" >
201+ <div class =" @WrapperClassName" style = " @ GetScrollStyleString (! IsFixedHeader ) " >
202202 @if (ActiveRenderMode == TableRenderMode .Table )
203203 {
204204 if (IsFixedHeader )
209209 @RenderHeader (true )
210210 < / table >
211211 < / div >
212- < div class = " table-fixed-body scroll" style = " @ScrollStyleString " >
212+ < div class = " table-fixed-body scroll" style = " @GetScrollStyleString(true) " >
213213 @RenderTable (false )
214214 < / div >
215215 }
Original file line number Diff line number Diff line change @@ -186,7 +186,9 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName(
186186
187187 private string ScrollWidthString => $ "width: { ActualScrollWidth } px;";
188188
189- private string ScrollStyleString => $ "--bb-scroll-width: { ActualScrollWidth } px; --bb-scroll-hover-width: { ActualScrollHoverWidth } px;";
189+ private string ? GetScrollStyleString ( bool condition ) => condition
190+ ? $ "--bb-scroll-width: { ActualScrollWidth } px; --bb-scroll-hover-width: { ActualScrollHoverWidth } px;"
191+ : null ;
190192
191193 private int ActualScrollWidth => ScrollWidth ?? Options . CurrentValue . ScrollOptions . ScrollWidth ;
192194
You can’t perform that action at this time.
0 commit comments