Skip to content

Commit 47a1580

Browse files
authored
Merge pull request xzdarcy#43 from mirko796/master
Pass estimatedColumnSize to Grid component in time_area.tsx
2 parents 7aee66f + 4cb1879 commit 47a1580

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/time_area/time_area.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const TimeArea: FC<TimeAreaProps> = ({ setCursor, maxScaleCount, hideCurs
4747
return showUnit ? scaleWidth / scaleSplitCount : scaleWidth;
4848
}
4949
};
50-
50+
const estColumnWidth=getColumnWidth({index:1});
5151
return (
5252
<div className={prefix('time-area')}>
5353
<AutoSizer>
@@ -58,6 +58,7 @@ export const TimeArea: FC<TimeAreaProps> = ({ setCursor, maxScaleCount, hideCurs
5858
ref={gridRef}
5959
columnCount={showUnit ? scaleCount * scaleSplitCount + 1 : scaleCount}
6060
columnWidth={getColumnWidth}
61+
estimatedColumnSize={estColumnWidth}
6162
rowCount={1}
6263
rowHeight={height}
6364
width={width}

0 commit comments

Comments
 (0)