fix: Blank space in Change dataset modal without warning message (#16324)

* Make scrollTable flex

* Revert unclosable warning
This commit is contained in:
Geido 2021-08-19 16:46:25 +02:00 committed by GitHub
parent d75da748d5
commit c5c28618a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -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}

View File

@ -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>
);
};