Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkorep committed Nov 19, 2024
1 parent 811fbc5 commit 3e581bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/Grid/useColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ const MIN_COLUMN_WIDTH = 32;
* Measures the minimum width required to display all content in a column without wrapping or truncation.
* Note. We cannot simply measure item.scrollWidth, because it will return the current width if it is larger than needed.
* To workaround it, we temporary shrink the column width to MIN_COLUMN_WIDTH and measure the scrollWidth.
* @param {number} columnIndex - The index of the column to measure
* @param {HTMLDivElement} outerGrid - The grid element containing the column
* @returns {number} The minimum width needed for the column's content (in pixels)
* Returns MIN_COLUMN_WIDTH if outerGridRef is not available
* @param {number} columnIndex - The index of the column to measure.
* @param {HTMLDivElement} outerGrid - The grid element containing the column.
* @returns {number} The minimum width needed for the column's content (in pixels).
*/
const measureColumnWidth = (columnIndex: number, outerGrid: HTMLDivElement): number => {
// Store the original widths
Expand Down

0 comments on commit 3e581bd

Please sign in to comment.