mirror of
https://github.com/apache/superset.git
synced 2026-09-04 06:21:45 +00:00
fix(sqllab): invalid height in ResultTable (#37408)
This commit is contained in:
@@ -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;
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user