mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix(sqllab): fix blank bottom section in SQL Lab left panel (#35309)
This commit is contained in:
committed by
GitHub
parent
027b25e6b8
commit
784ff82847
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user