Semantic-UI: Single dropdown selection does not work when clicking an item and having 'select' action (version 2.2.1)
Installed version: 2.2.1
I have the following dropdown configuration:
dropdownSelector
.dropdown({
fullTextSearch: true,
preserveHTML: true,
onChange,
action: 'select',
onHide: this.onHide,
onShow: this.onShow,
transition
});
I am using the ‘select’ action since I don’t want the current text to be changed.
Prior version 2.2.x, it works fine. After the upgrade, the ‘onChange’ is not dispatched when clicking the dropdown item - but, it dispatched when moving around with the keyboard arrow keys.
I also tried to add allowReselection: true
but it did not fix it.
Any idea?
Clicking the item is not doing anything, but moving around with the keyboard works.
When I remove the ‘select’ action it works, but it changed the selected text.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Fixes #4183 Fixes not working correctly since due to incorrect use of new function signature. — committed to Semantic-Org/Semantic-UI by jlukic 8 years ago
- Merge pull request #4510 from martinduparc/patch-1 Fix for #4183 — committed to Semantic-Org/Semantic-UI by jlukic 6 years ago
- Rlsnotes #4183 — committed to Semantic-Org/Semantic-UI by jlukic 6 years ago
I’ve fixed this for next patch release.
Yes.
Semantic-UI 2.1.8: https://jsfiddle.net/no7kfus9/ Clicking on the dropdown’s items works fine (you get an alert).
Semantic-UI 2.2.1: https://jsfiddle.net/rgdb931n/ Clicking on the dropdown’s items does not trigger the onChange event (you don’t get alert). The onChange it triggered when you try to navigate with the keyboard arrows keys. (in the previous version, navigate with the keyboard keys was not triggered the onChange event)
Ignore the bad style 😃