You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will cause item 7 to be displayed instead of the correct 12. Here is why I think it is happening.
The code must be iterating over the select tag to find the index of the selected option. If it sees an optgroup, it does not expand it, but counts it as 1. In the above example, it optgroup is not expanded, the selected item is the 8th item on this list.
When deciding which index to put the selected on after rendering, optgroup is included so the 8th element is chosen, in this case: 7.
The text was updated successfully, but these errors were encountered:
Scenario:
This will cause item 7 to be displayed instead of the correct 12. Here is why I think it is happening.
The code must be iterating over the select tag to find the index of the selected option. If it sees an optgroup, it does not expand it, but counts it as 1. In the above example, it optgroup is not expanded, the selected item is the 8th item on this list.
When deciding which index to put the selected on after rendering, optgroup is included so the 8th element is chosen, in this case: 7.
The text was updated successfully, but these errors were encountered: