Skip to content

Commit

Permalink
fix: on resize Header and body of the tables are mismatched (#369)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Jahn <[email protected]>
  • Loading branch information
eugenejahn authored Apr 10, 2022
1 parent 5f61ea5 commit 5842753
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/components/Executions/Tables/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ export const useExecutionTableStyles = makeStyles((theme: Theme) => ({
flexDirection: 'row',
},
rowColumn: {
flexGrow: 0,
flexShrink: 0,
marginRight: theme.spacing(1),
minWidth: 0,
paddingBottom: theme.spacing(1),
Expand Down
4 changes: 3 additions & 1 deletion src/components/Tables/DataList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
List,
ListRowRenderer,
} from 'react-virtualized';
import { headerGridHeight, tableGridPadding } from './constants';
import { headerGridHeight, tableGridPadding, minListContainerHeight } from './constants';
import { LoadMoreRowContent } from './LoadMoreRowContent';

const useStyles = makeStyles((theme: Theme) => ({
Expand All @@ -24,6 +24,8 @@ const useStyles = makeStyles((theme: Theme) => ({
listContainer: {
display: 'flex',
flexDirection: 'column',
// set minHeight to avoid AutoResizer setting height to 0
minHeight: theme.spacing(minListContainerHeight),
},
noRowsContent: {
color: tablePlaceholderColor,
Expand Down
1 change: 1 addition & 0 deletions src/components/Tables/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const loadMoreRowGridHeight = 6;
export const headerGridHeight = 6;
export const tableGridPadding = 1;
export const minListContainerHeight = 24;

0 comments on commit 5842753

Please sign in to comment.