From ad65d5a4b8646f4ef7a561bc9ebf55ac848cf039 Mon Sep 17 00:00:00 2001 From: Adrian Estevez Date: Wed, 14 Dec 2022 19:42:35 -0500 Subject: [PATCH] fix: onFocus and onClick in Picklist triggered when it should not --- src/components/Picklist/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Picklist/index.js b/src/components/Picklist/index.js index df0a696fd..6bf948802 100644 --- a/src/components/Picklist/index.js +++ b/src/components/Picklist/index.js @@ -154,6 +154,7 @@ class Picklist extends Component { this.setState({ isOpen: false, }); + this.focus(); } handleInputClick(event) { @@ -168,8 +169,8 @@ class Picklist extends Component { handleFocus() { const { isOpen } = this.state; + const { onFocus, value } = this.props; if (!isOpen) { - const { onFocus, value } = this.props; const eventValue = value || null; onFocus(eventValue); }