Skip to content

Commit 2c034b3

Browse files
committed
make csv viz full width
1 parent c07157f commit 2c034b3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/components/dagshub/data-engine/CSVViewer/CSVViewer.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import 'ag-grid-community/styles/ag-theme-quartz.css';
66
export function CSVViewer({
77
headers,
88
values,
9-
columnWidth = 150
109
}: {
1110
headers: string[];
1211
values: string[][];
13-
columnWidth?: number;
1412
}) {
1513
// Convert the data into the format expected by AgGridReact
1614
const rowData = values.map((rowValues) => {
@@ -35,7 +33,6 @@ export function CSVViewer({
3533
colId: header,
3634
field: header,
3735
filter: 'agTextColumnFilter',
38-
width: columnWidth,
3936
floatingFilter: true,
4037
headerTooltip: header
4138
}))
@@ -45,8 +42,7 @@ export function CSVViewer({
4542
<div
4643
className={'ag-theme-quartz'}
4744
style={{
48-
width: `${headers.length * columnWidth + 67}px`,
49-
maxWidth: '100%',
45+
width: '100%',
5046
height: '100%',
5147
fontFamily: 'Inter!important'
5248
}}

src/components/dagshub/data-engine/singleFileViewModal/SingleFileViewFileRenderer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const SingleFileViewFileRenderer = ({ itemData }: VisualizerProps) => {
142142
);
143143
}
144144
if (itemType === 'csv') {
145-
return <CSVViewer headers={csvHeaders} values={csvValues} columnWidth={160} />;
145+
return <CSVViewer headers={csvHeaders} values={csvValues} />;
146146
}
147147
}
148148
return <ItemFallback height={'100%'} width={'100%'} disableHoverMode />;

0 commit comments

Comments
 (0)