Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[Feature] Keeping classes of the options #30

Closed
stof opened this Issue · 6 comments

3 participants

@stof
Collaborator

I would like being able to add a class on some <option> items of the HTML select list and have them added to the <li> item of the list created by the plugin when using it to enhance the form as I need to be able to style some options in a specific way.

None of the plugin I found to enhance select lists support it currently. Your plugin seems really good and I consider using it so I would love if it supports this feature.

@pfiller
Owner

I think this may be viable, but will need to test performance when looping over 100's of options before committing.

@stof
Collaborator

you could make it configurable (at least for the jQuery plugin where it is common to provide options when using them. I never used prototype to know how it works). This way, it could be activated only when the user need it to have better performances.

@pfiller
Owner

I was unable to detect a noticeable performance hit on a select with thousands of options. As of 7dd2908, Chosen retains the original form element's options.

@pfiller pfiller closed this
@stof
Collaborator

thanks

@pfiller pfiller referenced this issue from a commit
@pfiller pfiller Up version number to 0.9.5
- Allow disabling of Search on single select boxes with <= N options (#45).
- Retain original option styles
- Retain original option classes (#30)
- Fix show results bug when clicking close icon (#277)
1e49c19
@mdi
mdi commented

How about inheriting a select's class and title attributes? e.g. for adding a tooltip to a select.

@pfiller
Owner

@mdi That is covered in a different feature request (#209)

@puckbag puckbag referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.