From aecc644971ffafa93f9affd22294a22de03b9ee7 Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Fri, 19 Oct 2018 13:54:10 -0400 Subject: [PATCH 1/2] Changes from falsy check for value prop in select to null equality --- src/components/form/select/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/form/select/select.js b/src/components/form/select/select.js index 032c2be7d54..ad9cddf998c 100644 --- a/src/components/form/select/select.js +++ b/src/components/form/select/select.js @@ -48,7 +48,7 @@ export const EuiSelect = ({ // React HTML input can not have both value and defaultValue properties. // https://reactjs.org/docs/uncontrolled-components.html#default-values let selectDefaultValue; - if (!value) { + if (value == null) { selectDefaultValue = defaultValue || ''; } From f524fb1f0ad7712842ab5296d1da160b750695cb Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Fri, 19 Oct 2018 14:54:10 -0400 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f3c1641d10..f7abe53b44b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Increased default font size of tabs in K6 theme ([#1244](https://github.com/elastic/eui/pull/1244)) + +**Bug fixes** + +- Fixed select warning on falsy value in EuiSelect ([#1254](https://github.com/elastic/eui/pull/1254)) ## [`4.5.2`](https://github.com/elastic/eui/tree/v4.5.2)