Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/BootstrapBlazor/Components/Table/Table.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,14 +730,14 @@ const autoFitColumnWidth = async (table, col) => {
const index = indexOfCol(col);
let rows = null;
if (table.thead) {
rows = table.body.querySelectorAll('table > tbody > tr:not(.is-detail)');
rows = [...table.tables[1].tBodies[0].rows].filter(x => !x.classList.contains('is-detail'));
}
else {
rows = table.tables[0].querySelectorAll('table > tbody > tr:not(.is-detail)');
rows = [...table.tables[0].tBodies[0].rows].filter(x => !x.classList.contains('is-detail'));
}

let maxWidth = 0;
[...rows].forEach(row => {
rows.forEach(row => {
const cell = row.cells[index];
maxWidth = Math.max(maxWidth, calcCellWidth(cell));
});
Expand Down