-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Support multiple init calls on the same element #18
Comments
+1 for this. Currently I get around this limitation by destroying elements when I'm done with them, but it would be great to be able to 'destroy' them, returning the HTML elements to their original state. |
+1 for this. Something similar to trigger update or something? Could do elm.select2('refresh') I need this to address #23 |
Would you have to pass the configuration object every single time? Wouldn't it perhaps be easier to just pass something like |
I was referring to the problem you originally mentioned, but it sounds like that's not actually an issue because the options list is refreshed Every time you click. If That's the case then everything should work fine for me. I just figured you would've open the ticket yourself for a reason. Sent via Hubroid |
ah. sorry. i commented on the wrong issue. thought we were still talking about #23. my bad. |
added destroy method, also more then one initializationis allowed on the same element - old one will be destroyed. |
Thank you for this. |
Update to select2 3.2
Multiple invocations of .select2({}) should be supported in case elements are updated via ajax. also, maybe a .select2('destroy') method...
The text was updated successfully, but these errors were encountered: