From cc056071dcb10ba712de4de6e31f523a0fd1d9f7 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 10 May 2018 06:43:20 -0600 Subject: [PATCH 1/3] only call copyInputStyles when still mounted --- src/components/combo_box/combo_box.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index 58f45889105..a96a97dd914 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -454,7 +454,9 @@ export class EuiComboBox extends Component { // TODO: This will need to be called once the actual stylesheet loads. setTimeout(() => { - this.autoSizeInput.copyInputStyles(); + if (this._isMounted) { + this.autoSizeInput.copyInputStyles(); + } }, 100); } From 2a9396b656550f9911d610291d124530035dc4ae Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 10 May 2018 07:13:01 -0600 Subject: [PATCH 2/3] update reademe --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1623f18322..7972930e30b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added aria labeling requirements for `EuiBadge` , as well as a generic prop_type function `requiresAriaLabel` in `utils` to check for it. ([#777](https://github.com/elastic/eui/pull/777)) ([#802](https://github.com/elastic/eui/pull/802)) - Ensure switches’ inputs are still hidden when `[disabled]` ([#778](https://github.com/elastic/eui/pull/778)) - Made boolean matching in `EuiSearchBar` more exact so it doesn't match words starting with booleans, like "truest" or "offer" ([#776](https://github.com/elastic/eui/pull/776)) +- `EuiComboBox` do not setState or call refs once component is unmounted ([807](https://github.com/elastic/eui/pull/807) and [#813](https://github.com/elastic/eui/pull/813)) ## [`0.0.46`](https://github.com/elastic/eui/tree/v0.0.46) From 39f37b3cf9e70d4084a402beba00d334222d7721 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 10 May 2018 10:21:56 -0600 Subject: [PATCH 3/3] test if autoSizeInput exists --- src/components/combo_box/combo_box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index a96a97dd914..dd92923ec95 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -454,7 +454,7 @@ export class EuiComboBox extends Component { // TODO: This will need to be called once the actual stylesheet loads. setTimeout(() => { - if (this._isMounted) { + if (this.autoSizeInput) { this.autoSizeInput.copyInputStyles(); } }, 100);