-
Notifications
You must be signed in to change notification settings - Fork 298
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
[SELECT2] Allow initialization JS overrides #666
Comments
The functionality you are requesting is already implemented :) You can override JS/CSS scripts :) |
Thank you @solomax ! The intent is not to replace the JS file reference, but to change this string: |
So you would like |
@solomax Kind of. Unfortunately some things are not available through options and it's needed to "override" the constructor like this:
and later call something like
So the |
I believe you can create PR :) |
I will |
@solomax is JIRA also needed? |
@andruhon no JIRA is required, this is not part of Apache Wicket :) |
@andruhon I believe the easiest way to implement this will be one more setting in |
The JS initialization script was moved from renderHead to Select2Behavior which is burned into the
AbstractSelect2Choice as a private final added in the constructor.
I would add a protected method, something like getSelect2Behavior which would return the select2Behavior, but will allow us to override it (maybe restrict to the Select2Behavior).
The JS inside could also be made customisable. Alternatively the string can be amended without overrides, though Select2Behavior settings.
Currently we have to do some hacking to get rid of default behavior, to add our slightly customized JS:
The text was updated successfully, but these errors were encountered: