fix: Blank space in Change dataset modal without warning message (#16324)
* Make scrollTable flex * Revert unclosable warning
This commit is contained in:
parent
d75da748d5
commit
c5c28618a5
|
|
@ -56,15 +56,14 @@ const EmptyWrapper = styled.div`
|
|||
`;
|
||||
|
||||
const TableViewStyles = styled.div<{
|
||||
hasPagination?: boolean;
|
||||
isPaginationSticky?: boolean;
|
||||
scrollTable?: boolean;
|
||||
small?: boolean;
|
||||
}>`
|
||||
${({ hasPagination, scrollTable, theme }) =>
|
||||
${({ scrollTable, theme }) =>
|
||||
scrollTable &&
|
||||
`
|
||||
height: ${hasPagination ? '300px' : '380px'};
|
||||
flex: 1 1 auto;
|
||||
margin-bottom: ${theme.gridUnit * 4}px;
|
||||
overflow: auto;
|
||||
`}
|
||||
|
|
@ -196,7 +195,7 @@ const TableView = ({
|
|||
|
||||
return (
|
||||
<>
|
||||
<TableViewStyles hasPagination={hasPagination} {...props}>
|
||||
<TableViewStyles {...props}>
|
||||
<TableCollection
|
||||
getTableProps={getTableProps}
|
||||
getTableBodyProps={getTableBodyProps}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,13 @@ interface ChangeDatasourceModalProps {
|
|||
show: boolean;
|
||||
}
|
||||
|
||||
const Modal = styled(StyledModal)`
|
||||
.ant-modal-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
`;
|
||||
|
||||
const ConfirmModalStyled = styled.div`
|
||||
.btn-container {
|
||||
display: flex;
|
||||
|
|
@ -239,7 +246,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
|||
};
|
||||
|
||||
return (
|
||||
<StyledModal
|
||||
<Modal
|
||||
show={show}
|
||||
onHide={onHide}
|
||||
responsive
|
||||
|
|
@ -307,7 +314,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({
|
|||
)}
|
||||
{confirmChange && <>{CONFIRM_WARNING_MESSAGE}</>}
|
||||
</>
|
||||
</StyledModal>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue