fix(sqllab): fix blank bottom section in SQL Lab left panel (#35309)

This commit is contained in:
Gabriel Torres Ruiz
2025-09-26 13:07:20 -04:00
committed by GitHub
parent 027b25e6b8
commit 784ff82847
2 changed files with 13 additions and 19 deletions

View File

@@ -168,6 +168,9 @@ const StyledToolbar = styled.div`
const StyledSidebar = styled.div`
padding: ${({ theme }) => theme.sizeUnit * 2.5}px;
height: 100%;
display: flex;
flex-direction: column;
`;
const StyledSqlEditor = styled.div`

View File

@@ -47,7 +47,6 @@ import TableElement from '../TableElement';
export interface SqlEditorLeftBarProps {
queryEditorId: string;
height?: number;
database?: DatabaseObject;
}
@@ -72,7 +71,6 @@ const LeftBarStyles = styled.div`
const SqlEditorLeftBar = ({
database,
queryEditorId,
height = 500,
}: SqlEditorLeftBarProps) => {
const allSelectedTables = useSelector<SqlLabRootState, Table[]>(
({ sqlLab }) =>
@@ -171,7 +169,6 @@ const SqlEditorLeftBar = ({
};
const shouldShowReset = window.location.search === '?reset=1';
const tableMetaDataHeight = height - 130; // 130 is the height of the selects above
const handleCatalogChange = useCallback(
(catalog: string | null) => {
@@ -228,22 +225,16 @@ const SqlEditorLeftBar = ({
/>
<div className="divider" />
<StyledScrollbarContainer>
<div
css={css`
height: ${tableMetaDataHeight}px;
`}
>
{tables.map(table => (
<TableElement
table={table}
key={table.id}
activeKey={tables
.filter(({ expanded }) => expanded)
.map(({ id }) => id)}
onChange={onToggleTable}
/>
))}
</div>
{tables.map(table => (
<TableElement
table={table}
key={table.id}
activeKey={tables
.filter(({ expanded }) => expanded)
.map(({ id }) => id)}
onChange={onToggleTable}
/>
))}
</StyledScrollbarContainer>
{shouldShowReset && (
<Button