Skip to content

Commit

Permalink
fix: onFocus and onClick in Picklist triggered when it should not
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Estevez authored and Adrian Estevez committed Dec 15, 2022
1 parent 0b0a92c commit ad65d5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Picklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class Picklist extends Component {
this.setState({
isOpen: false,
});
this.focus();
}

handleInputClick(event) {
Expand All @@ -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);
}
Expand Down

0 comments on commit ad65d5a

Please sign in to comment.