Web: Files: fixed display of items in download dialog

This commit is contained in:
Nikita Gopienko 2022-06-20 16:33:05 +03:00
parent d2c427c023
commit 3b5cb1b7fe
2 changed files with 2 additions and 9 deletions

View File

@ -18,7 +18,6 @@ const DownloadContent = (props) => {
title,
isChecked,
isIndeterminate,
showHeader,
} = props;
const getTitleExtensions = () => {
@ -108,6 +107,8 @@ const DownloadContent = (props) => {
setIsOpen(!isOpen);
};
const showHeader = items.length > 1;
return (
<StyledDownloadContent isOpen={showHeader ? isOpen : true}>
{showHeader && (

View File

@ -230,20 +230,12 @@ class DownloadDialogComponent extends React.Component {
other.filter((f) => f.checked).length <=
1;
const showHeader =
documents.length +
spreadsheets.length +
presentations.length +
other.length >
1;
const downloadContentProps = {
t,
extsConvertible,
onSelectFormat: this.onSelectFormat,
onRowSelect: this.onRowSelect,
getItemIcon: this.getItemIcon,
showHeader,
};
return (