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
Changing from Single Select to Multiple Select and back again #1560
Comments
Do you have an actual use case for this kind of behavior? Because I can't think of one.. |
My specific use case is a set of three fields: Name, Compare and Value, In the 1-to-many comparison case, I need to be able to select multiple Make sense?
|
I'm having the same situation which need a method of "swapping" between single and multiple select list. If you @thomb have figured out a method of doing so, please tell me. :) |
I ended up writing a wrapper for the library, wherein if I needed to switch Not super pretty, but it works.
|
It's nice to hear that you found a way through it. I think I tried this method but it didn't work for me. I am using Joomla 3.x with Chosen integrated, so there might be something else that messed it up. Thank you for sharing your problem! |
The HTML between a single and multiple Chosen select are quite different and there's no good way to switch them back and forth. I don't think there's ever going to be a better way to do this than destroying Chosen and calling it on the select after the switch. Closing! |
I was wondering if it was possible to have Chosen redraw itself after you set "multiple" on the original select element?
I know this is possible if I destroy() the original Chosen select, then trigger Chosen again on the same select, but it would be ideal of this could be picked up by "chosen:updated".
Cheers, and thanks!
Thom
The text was updated successfully, but these errors were encountered: