fix(sqllab): invalid height in ResultTable (#37408)

This commit is contained in:
JUST.in DO IT
2026-07-07 17:09:45 -07:00
committed by GitHub
parent 98fc857613
commit 866f8c51ee
3 changed files with 20 additions and 39 deletions
@@ -28,7 +28,7 @@ import {
} from '@superset-ui/core/components';
import ProgressBar from '@superset-ui/core/components/ProgressBar';
import { t } from '@apache-superset/core/translation';
import { QueryResponse, QueryState } from '@superset-ui/core';
import { QueryResponse } from '@superset-ui/core';
import { useTheme } from '@apache-superset/core/theme';
import { shallowEqual, useSelector } from 'react-redux';
import { useAppDispatch } from 'src/SqlLab/hooks/useAppDispatch';
@@ -406,24 +406,12 @@ const QueryTable = ({
modalBody={
selectedQuery ? (
<ModalResultSetWrapper>
{(() => {
const height =
reduxQueries[selectedQuery.id]?.state ===
QueryState.Success &&
reduxQueries[selectedQuery.id]?.results
? Math.floor(window.innerHeight * 0.5)
: undefined;
return (
<ResultSet
showSql
queryId={selectedQuery.id}
displayLimit={displayLimit}
defaultQueryLimit={1000}
useFixedHeight
height={height}
/>
);
})()}
<ResultSet
showSql
queryId={selectedQuery.id}
displayLimit={displayLimit}
defaultQueryLimit={1000}
/>
</ModalResultSetWrapper>
) : null
}
@@ -44,4 +44,5 @@ export const ModalResultSetWrapper = styled.div`
display: flex;
flex-direction: column;
overflow: hidden;
height: 500px;
`;