Choices
Choices copied to clipboard
Selected item is not the highlighted item when initializing the select
Describe the bug The selected option is not the highlighted choice when you initialize a select and view the choices. This is the way the native select works and what I've typically seen on all other custom selects.
To Reproduce Steps to reproduce the behavior:
- Create a Choices.js select with the last option selected
- Click on the select
- The first item is highlighted and marked as selected even though this isn't the selected option
Expected behavior The selected option should be the selected choice when opening the select.
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Version: 80.0.3987.149
I expected this item to be highlighted too. I've got a workaround here https://github.com/Choices-js/Choices/issues/586#issuecomment-1164127267