Skip to content

Commit

Permalink
Merge pull request #43 from mirko796/master
Browse files Browse the repository at this point in the history
Pass estimatedColumnSize to Grid component in time_area.tsx
  • Loading branch information
xzdarcy authored Mar 27, 2024
2 parents 7aee66f + 4cb1879 commit 47a1580
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/time_area/time_area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const TimeArea: FC<TimeAreaProps> = ({ setCursor, maxScaleCount, hideCurs
return showUnit ? scaleWidth / scaleSplitCount : scaleWidth;
}
};

const estColumnWidth=getColumnWidth({index:1});
return (
<div className={prefix('time-area')}>
<AutoSizer>
Expand All @@ -58,6 +58,7 @@ export const TimeArea: FC<TimeAreaProps> = ({ setCursor, maxScaleCount, hideCurs
ref={gridRef}
columnCount={showUnit ? scaleCount * scaleSplitCount + 1 : scaleCount}
columnWidth={getColumnWidth}
estimatedColumnSize={estColumnWidth}
rowCount={1}
rowHeight={height}
width={width}
Expand Down

0 comments on commit 47a1580

Please sign in to comment.