-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add treeitem to option selector (optgroup support) #47
base: master
Are you sure you want to change the base?
Conversation
There is an issue with optgroups because the labels of the optgroups also have the class `select2-results__option`. Adding the role to the selector fixes this issue. More details about the issue here. goodwill#46
@@ -40,7 +40,7 @@ def select2(value, options = {}) | |||
[value].flatten.each do |value| | |||
if find(:xpath, "//body").has_selector?("#{drop_container} li.select2-results__option") |
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.
Maybe the role attribute should be added to this line as well.
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.
Thanks for the review.
Should it? Did you run into a situation where this was an issue? I am asking because the comment on line 42 says 'select2 version 4.0' which might indicate that the API is not always the same.
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.
Works good for me.
Ah, that is true. Never mind then. On Wed, Sep 28, 2016, 2:02 AM Achilleas [email protected] wrote:
|
There is an issue with optgroups because the labels of the optgroups also have the class
select2-results__option
. Adding the role to the selector fixes this issue.More details about the issue here.
#46