We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56e72e commit 054b180Copy full SHA for 054b180
src/BootstrapBlazor/Components/Table/Table.razor.js
@@ -744,7 +744,10 @@ const autoFitColumnWidth = async (table, col) => {
744
745
if (table.options.fitColumnWidthIncludeHeader) {
746
const th = col.closest('th');
747
- maxWidth = Math.max(maxWidth, calcCellWidth(th));
+ const span = th.querySelector('.table-cell');
748
+ const thStyle = getComputedStyle(th);
749
+ const margin = parseFloat(thStyle.getPropertyValue('padding-left')) + parseFloat(thStyle.getPropertyValue('padding-right'))
750
+ maxWidth = Math.max(maxWidth, calcCellWidth(span)) + margin;
751
}
752
753
if (table.options.autoFitColumnWidthCallback !== null) {
0 commit comments