Skip to content

Commit

Permalink
Merge pull request #433 from ONLYOFFICE/bugfix/Bug-53194
Browse files Browse the repository at this point in the history
Fixed Bug 53194: Reduced distance from checkbox menu.
  • Loading branch information
gopienkonikita authored Oct 26, 2021
2 parents 51312c8 + 1faf4ee commit 5f0b7e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/asc-web-components/combobox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class ComboBox extends React.Component {
toggleAction,
textOverflow,
showDisabledItems,
offsetDropDownY,
} = this.props;
const { isOpen, selectedOption } = this.state;

Expand Down Expand Up @@ -138,7 +139,7 @@ class ComboBox extends React.Component {
className="dropdown-container not-selectable"
directionX={directionX}
directionY={directionY}
manualY="102%"
manualY={offsetDropDownY}
open={isOpen}
clickOutsideAction={this.handleClickOutside}
{...dropDownMaxHeightProp}
Expand Down Expand Up @@ -210,6 +211,8 @@ ComboBox.propTypes = {
textOverflow: PropTypes.bool,
/** Disables clicking on the icon */
disableIconClick: PropTypes.bool,
/** Y offset */
offsetDropDownY: PropTypes.string,
};

ComboBox.defaultProps = {
Expand All @@ -221,6 +224,7 @@ ComboBox.defaultProps = {
size: "base",
disableIconClick: true,
showDisabledItems: false,
offsetDropDownY: "102%",
};

export default ComboBox;
6 changes: 4 additions & 2 deletions packages/asc-web-components/group-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ class GroupButton extends React.Component {
? { maxHeight: dropDownMaxHeight }
: {};
const offsetSelectDropDown = isSelect
? { manualX: window.innerWidth <= 1024 ? "16px" : "24px" }
? { manualX: window.innerWidth <= 1024 ? "44px" : "50px" }
: {};

const manualY = window.innerWidth <= 1024 ? "60px" : "53px";

return (
<StyledGroupButton
ref={this.ref}
Expand Down Expand Up @@ -140,7 +142,7 @@ class GroupButton extends React.Component {
<DropDown
{...dropDownMaxHeightProp}
{...offsetSelectDropDown}
manualY="72px"
manualY={manualY}
open={this.state.isOpen}
clickOutsideAction={this.clickOutsideAction}
showDisabledItems={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const TableGroupMenu = (props) => {
className="table-container_group-menu-combobox not-selectable"
options={[]}
selectedOption={{}}
offsetDropDownY="44px"
/>
<div className="table-container_group-menu-separator" />
{headerMenu.map((item, index) => {
Expand Down

0 comments on commit 5f0b7e3

Please sign in to comment.