From 0f8dedf2a0269276275648e1bd28e94daf4224ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Franco=20Knob?= Date: Tue, 3 Dec 2019 15:48:30 -0300 Subject: [PATCH 1/2] Sets focus back to the input element after each scroll --- 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 23b132321ac..be6b53f2c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **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 ([#](https://github.com/elastic/eui/pull/)) ## [`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()} /> ); From 82c1b8e96b0afdf7b806d4f0276f84a97f9f110f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Franco=20Knob?= Date: Tue, 3 Dec 2019 15:51:43 -0300 Subject: [PATCH 2/2] Adds PR number to CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be6b53f2c04..a9b0e2d8ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ **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 ([#](https://github.com/elastic/eui/pull/)) +- 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)