diff --git a/package/src/components/Select/v1/Select.js b/package/src/components/Select/v1/Select.js index 523243dfe..f353b261b 100644 --- a/package/src/components/Select/v1/Select.js +++ b/package/src/components/Select/v1/Select.js @@ -573,7 +573,7 @@ class Select extends Component { passthroughProps[prop] = this.props[prop]; }); - let optionValue; + let optionValue = null; if (value !== undefined && value !== null) { optionValue = reactSelectOptions.find((opt) => { if (opt.options) return opt.options.find((o) => o.value === value); diff --git a/package/src/components/Select/v1/Select.test.js b/package/src/components/Select/v1/Select.test.js index 7ccce3268..923409144 100644 --- a/package/src/components/Select/v1/Select.test.js +++ b/package/src/components/Select/v1/Select.test.js @@ -55,3 +55,11 @@ test("alphabetize option snapshot", () => { const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); + +test("when value prop changes to `null`, selection is cleared", () => { + const wrapper = mount(