Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#789 wrap text table #852

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,13 @@
margin-top: -10px;
}

.MuiDataGrid-virtualScroller {
overflow-y: hidden !important;
}

.MuiDataGrid-panel{
.MuiDataGrid-panel {
translate: 0px -152%;
}

.MuiCard-root {
box-shadow: 0 0 #0000,0 0 #0000,var(--tw-shadow) !important;
box-shadow: var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow) !important;
box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow) !important;
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
}

.white-text {
Expand Down Expand Up @@ -188,7 +184,6 @@
text-align: center;
}


.card-view.expanded {
position: absolute;
top: 0;
Expand Down Expand Up @@ -218,24 +213,23 @@

.card-view .MuiTablePagination-root {
margin-top: 0px;

}

@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
}
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
}

70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
}

100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
}

/* Workaround for Needle not handling menu placement of dropdowns on modals */
Expand All @@ -247,14 +241,14 @@
/* End workaround */

/* Workaround for cleaning the Gantt chart UI */
.gantt-wrapper > div > div:first-child > div:first-child > div:first-child > div> div:not(:first-child) {
.gantt-wrapper > div > div:first-child > div:first-child > div:first-child > div > div:not(:first-child) {
display: none;
}
.gantt-wrapper > div > div > div > div> div> div> div:not(:first-child) {
.gantt-wrapper > div > div > div > div > div > div > div:not(:first-child) {
display: none;
}
/* End Gantt chart workaround */

.markdown-widget a {
text-decoration: underline;
}
}
9 changes: 8 additions & 1 deletion src/chart/table/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ export const NeoTableChart = (props: ChartProps) => {
<DataGrid
key={'tableKey'}
headerHeight={32}
rowHeight={tableRowHeight}
density={compact ? 'compact' : 'standard'}
getRowHeight={() => 'auto'}
rows={rows}
columns={columns}
columnVisibilityModel={columnVisibilityModel}
Expand Down Expand Up @@ -305,6 +306,12 @@ export const NeoTableChart = (props: ChartProps) => {
})
.join(' ');
}}
sx={{
'&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell': { py: '3px' },
'&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell': { py: '15px' },
'&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell': { py: '22px' },
'&.MuiDataGrid-root .MuiDataGrid-cell': { wordBreak: 'break-word' },
}}
/>
</div>
</ThemeProvider>
Expand Down
Loading