Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Rall3n committed Oct 24, 2022
1 parent b38fce0 commit b758147
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-select/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,12 @@ export default class Select<
// ensure select state gets blurred in case Select is programmatically disabled while focused
// eslint-disable-next-line react/no-did-update-set-state
this.setState({ isFocused: false }, this.onMenuClose);
} else if (!isFocused && !isDisabled && prevProps.isDisabled && this.inputRef === document.activeElement) {
} else if (
!isFocused &&
!isDisabled &&
prevProps.isDisabled &&
this.inputRef === document.activeElement
) {
// ensure select state gets focused in case Select is programatically re-enabled while focused (Firefox)
// eslint-disable-next-line react/no-did-update-set-state
this.setState({ isFocused: true });
Expand Down

0 comments on commit b758147

Please sign in to comment.