-
Notifications
You must be signed in to change notification settings - Fork 52
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
Update for select 4.x? #18
Comments
I'd love to, but I have no plans to do so myself until it comes out of
|
4.x has been in the RC phase, it looks like a big change and introduce some API changes that may break this component. Especially the .select2('val') has been removed and favor $.val() and opts.query has been deprecated and favor new DataAdapter. I try to hack a little on the current code, but failed. This component is a little bit complicated than I think... |
Hi everyone! I just discovered this plugin (angular-select2) and noticed this ticket was open. I wouldn't mind taking a shot at converting this over, as long as there are somewhat-updated tests that I can bounce changes off of. I think this plugin might be easier to convert, as long as there aren't any major hacks, and I wouldn't mind replacing the now-deprecated |
Actually, I'm using the new select 2 4.x right now, and I discover that for the most part you don't even need a custom angularjs directive for it. The reason is that they moved from using input to select completely so you can simply plug the ngModel to that select element and it works nicely. There may be some edge cases but I haven't encountered yet. |
Right now the Select2 4.0 is out of beta. Any estimation to make angular-select2 compatible with Select2 4.0 ? |
@rbatllet I'm guessing that it'll be quite a bit of work. Given that select2 3.x works perfectly fine, it's not a priority for us to upgrade (plenty of other work to do). Anyone who wants to help out is welcome to, I'll gladly setup a branch where we can start working and will happily review/accept pull requests. But for now I (nor my company) won't be making the effort myself. |
@rubenv Please go forward setting up that branch so that PRs can be made against it, thanks |
I started here: https://github.com/motin/angular-select2/tree/select2-4.0-support-wip feel free to chip in :) |
It's basically "done". https://github.com/motin/angular-select2/tree/select2-4.0-support-wip JS Bin here: https://jsbin.com/gipezidemi/edit?html,js,output To make it work with select2 4.0 showed out to be a minor task, thanks to the fact that the underlying element is now a select-element and not an input-element. Most of the directive's code could be removed, and the select2 examples from the readme works as expected. However, I have not updated any of the tests in the repo (nor will I), and there are probably additional features that were included in the previous angular-select2 that are now broken, so additional work may need to be done. Anyway, it is a start, let me know when there is a branch for 4.0 support work against which I can submit a PR. Thanks. |
Am currently traveling but will do so soon. Thanks for picking this up!
|
+1 |
@motin, great simple solution |
I've pushed a |
What about v4 support? |
The new select2 introduces quite a few BC, among them is the deprecation of hidden field in various places. I wonder if this plugin is ready for 4.x and if not do you have any plan to support it?
The text was updated successfully, but these errors were encountered: