Skip to content

Commit

Permalink
Increasing z-index of Select component to overlay other elements.
Browse files Browse the repository at this point in the history
Before this change, other elements (namely react-bootstrap input
components with addons) overlapped with `Select` inputs due to a higher
`z-index` of the first.

This change is increasing the `z-index` of the `Select`/`react-select`
menu to `3` (react-bootstrap input addons are on `2`) to prevent this.

Fixes #4769.
  • Loading branch information
dennisoelkers committed Jun 12, 2018
1 parent 841123b commit 06beb2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion graylog2-web-interface/src/components/common/Select.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@

.select-sm .Select-input > input {
padding: 0;
}
}

:local(.increaseZIndex) .Select-menu-outer {
z-index: 3;
}

2 changes: 1 addition & 1 deletion graylog2-web-interface/src/components/common/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const Select = createReactClass({
}

return (
<div className={size === 'small' ? 'select-sm' : ''}>
<div className={`${size === 'small' ? 'select-sm' : ''} ${this.reactSelectSmStyles.locals.increaseZIndex}`}>
<SelectComponent ref={(c) => { this._select = c; }}
onChange={onReactSelectChange || this._onChange}
{...reactSelectProps}
Expand Down

0 comments on commit 06beb2c

Please sign in to comment.