From 489ca6a3b164f78758b1ad8b3d8633157580d71a Mon Sep 17 00:00:00 2001 From: ffknob Date: Tue, 3 Dec 2019 17:58:45 -0300 Subject: [PATCH] EuiComboBox: Sets focus back to the input element after each scroll (#2589) * Sets focus back to the input element after each scroll * Adds PR number to CHANGELOG --- CHANGELOG.md | 1 + src/components/combo_box/__snapshots__/combo_box.test.js.snap | 1 + src/components/combo_box/combo_box.js | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d52592f35..97b9c03e478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ No public interface changes since `16.2.0`. **Bug fixes** - Fixed `EuiSwitch` clicking on disabled label ([#2575](https://github.com/elastic/eui/pull/2575)) +- Fixed `EuiComboBox` options list closing when clicking outside the component after scrolling ([#2589](https://github.com/elastic/eui/pull/2589)) ## [`16.1.0`](https://github.com/elastic/eui/tree/v16.1.0) diff --git a/src/components/combo_box/__snapshots__/combo_box.test.js.snap b/src/components/combo_box/__snapshots__/combo_box.test.js.snap index f4afc129423..125cfbc0db9 100644 --- a/src/components/combo_box/__snapshots__/combo_box.test.js.snap +++ b/src/components/combo_box/__snapshots__/combo_box.test.js.snap @@ -466,6 +466,7 @@ exports[`props singleSelection selects existing option when opened 1`] = ` onCloseList={[Function]} onOptionClick={[Function]} onOptionEnterKey={[Function]} + onScroll={[Function]} optionRef={[Function]} options={ Array [ diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index 08f8254a69d..5aa2e79df2d 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -723,6 +723,7 @@ export class EuiComboBox extends Component { fullWidth={fullWidth} rootId={this.rootId} onCloseList={this.closeList} + onScroll={() => this.searchInput.focus()} /> );