Skip to content

Commit 5c0be2f

Browse files
AApuciArgoZhang
andauthored
fix(Table): adjust margin compare logic (dotnetcore#6885)
* Fix column width calculation in autoFitColumnWidth 调整参数 fitColumnWidthIncludeHeader 设置后,最大宽度的比较方式。 * Update Table.razor.js Signed-off-by: AApuci <[email protected]> * chore: bump version 9.11.2-beta05 --------- Signed-off-by: AApuci <[email protected]> Co-authored-by: Argo Zhang <[email protected]>
1 parent 2f268c1 commit 5c0be2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.11.2-beta04</Version>
4+
<Version>9.11.2-beta05</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Table/Table.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ const autoFitColumnWidth = async (table, col) => {
747747
const span = th.querySelector('.table-cell');
748748
const thStyle = getComputedStyle(th);
749749
const margin = parseFloat(thStyle.getPropertyValue('padding-left')) + parseFloat(thStyle.getPropertyValue('padding-right'))
750-
maxWidth = Math.max(maxWidth, calcCellWidth(span)) + margin;
750+
maxWidth = Math.max(maxWidth, calcCellWidth(span) + margin);
751751
}
752752

753753
if (table.options.autoFitColumnWidthCallback !== null) {

0 commit comments

Comments
 (0)