-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Dropdown): clear searchQuery on item selection by mouse click #3317
fix(Dropdown): clear searchQuery on item selection by mouse click #3317
Conversation
- Remove check to have consistent behavior with `selectItemOnEnter` Relates to Semantic-Org#3306
Codecov Report
@@ Coverage Diff @@
## master #3317 +/- ##
==========================================
- Coverage 99.89% 99.89% -0.01%
==========================================
Files 170 170
Lines 2802 2801 -1
==========================================
- Hits 2799 2798 -1
Misses 3 3
Continue to review full report at Codecov.
|
@@ -729,8 +729,7 @@ export default class Dropdown extends Component { | |||
this.setValue(newValue) | |||
this.setSelectedIndex(value) | |||
|
|||
const optionSize = _.size(this.getMenuOptions()) | |||
if (!multiple || isAdditionItem || optionSize === 1) this.clearSearchQuery() | |||
this.clearSearchQuery() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is absolutely valid, we did this in #2162 and even had an comment about this #2162 (comment).
See our decision #2162 (comment). I checked examples manually, LGTM.
@kohakukun thanks for the investigation 👍 |
selectItemOnEnter
Fixes #3306.