Web:Components:Display list at bottom if mobile view.

This commit is contained in:
Vlada Gazizova 2023-01-16 17:04:48 +03:00
parent 0dbf8b1df8
commit 8ace49e484
4 changed files with 23 additions and 1 deletions

View File

@ -112,6 +112,7 @@ class ComboBox extends React.Component {
isAside,
withBackground,
advancedOptionsCount,
isMobileView,
} = this.props;
const { tabIndex, ...props } = this.props;
@ -210,6 +211,7 @@ class ComboBox extends React.Component {
withBackdrop={withBackdrop}
isAside={isAside}
withBackground={withBackground}
isMobileView={isMobileView && !disableMobileView}
>
{advancedOptions
? advancedOptions

View File

@ -242,7 +242,13 @@ class DropDown extends React.PureComponent {
};
renderDropDown() {
const { maxHeight, children, showDisabledItems, theme } = this.props;
const {
maxHeight,
children,
showDisabledItems,
theme,
isMobileView,
} = this.props;
const { directionX, directionY, width, manualY } = this.state;
let cleanChildren = children;
@ -268,6 +274,7 @@ class DropDown extends React.PureComponent {
manualY={manualY}
isExternalLink={this.props.isExternalLink}
isPersonal={this.props.isPersonal}
isMobileView={isMobileView}
{...dropDownMaxHeightProp}
>
{maxHeight ? (

View File

@ -79,6 +79,17 @@ const StyledDropdown = styled.div`
&.download-dialog-dropDown {
margin-top: 4px;
}
@media (orientation: portrait) {
${(props) =>
props.isMobileView &&
css`
top: auto !important;
bottom: 0;
left: 0;
width: 100%;
`}
}
`;
StyledDropdown.defaultProps = { theme: Base };

View File

@ -22,6 +22,7 @@ const TableGroupMenu = (props) => {
isInfoPanelVisible,
toggleInfoPanel,
withoutInfoPanelToggler,
isMobileView,
...rest
} = props;
const onCheckboxChange = (e) => {
@ -54,6 +55,7 @@ const TableGroupMenu = (props) => {
manualY="42px"
manualX="-32px"
title={t("Common:TitleSelectFile")}
isMobileView={isMobileView}
/>
<div className="table-container_group-menu-separator" />
<StyledScrollbar>