Skip to content

Commit

Permalink
Fixed bug in EuiComboBox always showing a scrollbar (#3744)
Browse files Browse the repository at this point in the history
* Fixed EuiComboBox always showing a scrollbar

* Adding the right PR number to CL
  • Loading branch information
elizabetdev authored Jul 16, 2020
1 parent a7d7348 commit 0506bb5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)

**Bug fixes**

- Fixed `EuiComboBox` always showing a scrollbar ([#3744](https://github.com/elastic/eui/pull/3744))
- Replaced `react-focus-lock` with `react-focus-on` ([#3631](https://github.com/elastic/eui/pull/3631))

## [`27.1.0`](https://github.com/elastic/eui/tree/v27.1.0)
Expand Down
26 changes: 13 additions & 13 deletions src/components/combo_box/__snapshots__/combo_box.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ exports[`props options list is rendered 1`] = `
class="euiComboBoxOptionsList__rowWrap"
>
<div
style="position: relative; height: 189px; width: 0px; overflow: auto; direction: ltr;"
style="position: relative; height: 203px; width: 0px; overflow: auto; direction: ltr;"
>
<div
id="htmlid_listbox"
role="listBox"
style="height: 270px; width: 100%;"
style="height: 290px; width: 100%;"
tabindex="0"
>
<button
Expand All @@ -331,7 +331,7 @@ exports[`props options list is rendered 1`] = `
data-test-subj="titanOption"
id="htmlid__option-0"
role="option"
style="position: absolute; left: 0px; top: 0px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 0px; height: 29px; width: 100%;"
title="Titan"
type="button"
>
Expand All @@ -354,7 +354,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-1"
role="option"
style="position: absolute; left: 0px; top: 27px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 29px; height: 29px; width: 100%;"
title="Enceladus"
type="button"
>
Expand All @@ -377,7 +377,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-2"
role="option"
style="position: absolute; left: 0px; top: 54px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 58px; height: 29px; width: 100%;"
title="Mimas"
type="button"
>
Expand All @@ -400,7 +400,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-3"
role="option"
style="position: absolute; left: 0px; top: 81px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 87px; height: 29px; width: 100%;"
title="Dione"
type="button"
>
Expand All @@ -423,7 +423,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-4"
role="option"
style="position: absolute; left: 0px; top: 108px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 116px; height: 29px; width: 100%;"
title="Iapetus"
type="button"
>
Expand All @@ -446,7 +446,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-5"
role="option"
style="position: absolute; left: 0px; top: 135px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 145px; height: 29px; width: 100%;"
title="Phoebe"
type="button"
>
Expand All @@ -469,7 +469,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-6"
role="option"
style="position: absolute; left: 0px; top: 162px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 174px; height: 29px; width: 100%;"
title="Rhea"
type="button"
>
Expand All @@ -492,7 +492,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-7"
role="option"
style="position: absolute; left: 0px; top: 189px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 203px; height: 29px; width: 100%;"
title="Pandora is one of Saturn's moons, named for a Titaness of Greek mythology"
type="button"
>
Expand All @@ -515,7 +515,7 @@ exports[`props options list is rendered 1`] = `
class="euiFilterSelectItem"
id="htmlid__option-8"
role="option"
style="position: absolute; left: 0px; top: 216px; height: 27px; width: 100%;"
style="position: absolute; left: 0px; top: 232px; height: 29px; width: 100%;"
title="Tethys"
type="button"
>
Expand Down Expand Up @@ -741,7 +741,7 @@ exports[`props singleSelection prepend and append is rendered 1`] = `
}
position="bottom"
rootId={[Function]}
rowHeight={27}
rowHeight={29}
scrollToIndex={-1}
searchValue=""
selectedOptions={Array []}
Expand Down Expand Up @@ -875,7 +875,7 @@ exports[`props singleSelection selects existing option when opened 1`] = `
}
position="bottom"
rootId={[Function]}
rowHeight={27}
rowHeight={29}
scrollToIndex={-1}
searchValue=""
selectedOptions={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class EuiComboBoxOptionsList<T> extends Component<

static defaultProps = {
'data-test-subj': '',
rowHeight: 27, // row height of default option renderer
rowHeight: 29, // row height of default option renderer
};

updatePosition = () => {
Expand Down

0 comments on commit 0506bb5

Please sign in to comment.