Merge branch 'release/rc-v1.2.0' of github.com:ONLYOFFICE/DocSpace into release/rc-v1.2.0

This commit is contained in:
Elyor Djalilov 2022-12-13 12:34:46 +05:00
commit 658af130af

View File

@ -140,7 +140,18 @@ class ComboBox extends React.Component {
let optionsCount = optionsLength;
if (withAdvancedOptions) {
optionsCount = advancedOptionsCount ? advancedOptionsCount : 6;
const advancedOptionsWithoutSeparator = advancedOptions.props.children.filter(
(option) => option.key !== "s1"
);
const advancedOptionsWithoutSeparatorLength =
advancedOptionsWithoutSeparator.length;
optionsCount = advancedOptionsCount
? advancedOptionsCount
: advancedOptionsWithoutSeparatorLength
? advancedOptionsWithoutSeparatorLength
: 6;
}
const disableMobileView = optionsCount < 5;