Skip to content
Prev Previous commit
Next Next commit
Improve header selection logic in column resize feature
Co-authored-by: vnbaaij <[email protected]>
  • Loading branch information
Copilot and vnbaaij committed Jun 11, 2025
commit 565ebe29fefa79b45317b1039c6422bced1739d5
4 changes: 2 additions & 2 deletions src/Core/Components/DataGrid/FluentDataGrid.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ export function enableColumnResizing(gridElement, resizeColumnOnAllRows = true)
let resizeHandleHeight = tableHeight;
if (!resizeColumnOnAllRows) {
// Only use the header height when resizeColumnOnAllRows is false
const headerRow = gridElement.querySelector('thead tr th');
resizeHandleHeight = headerRow ? headerRow.offsetHeight : 40; // fallback to 40px if header not found
// Use the first header's height if available
resizeHandleHeight = headers.length > 0 ? headers[0].offsetHeight : 40; // fallback to 40px if no headers
}

headers.forEach((header) => {
Expand Down
Loading