Skip to content
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

Open
yellow1912 opened this issue Mar 10, 2015 · 14 comments
Open

Update for select 4.x? #18

yellow1912 opened this issue Mar 10, 2015 · 14 comments

Comments

@yellow1912
Copy link

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?

@rubenv
Copy link
Owner

rubenv commented Mar 10, 2015

I'd love to, but I have no plans to do so myself until it comes out of
beta. Will happily start accepting patches on a branch though.
On 10 Mar 2015 18:31, "yellow1912" [email protected] wrote:

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?


Reply to this email directly or view it on GitHub
#18.

@oliverzy
Copy link

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...

@kevin-brown
Copy link

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 ui-select2 in the AngularJS line of the Select2 readme.

@yellow1912
Copy link
Author

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.

@rbatllet
Copy link
Contributor

Right now the Select2 4.0 is out of beta. Any estimation to make angular-select2 compatible with Select2 4.0 ?

https://select2.github.io/announcements-4.0.html

@rubenv
Copy link
Owner

rubenv commented Aug 15, 2015

@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.

@motin
Copy link

motin commented Sep 1, 2015

@rubenv Please go forward setting up that branch so that PRs can be made against it, thanks

@motin
Copy link

motin commented Sep 1, 2015

I started here: https://github.com/motin/angular-select2/tree/select2-4.0-support-wip feel free to chip in :)

@motin
Copy link

motin commented Sep 2, 2015

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.

@rubenv
Copy link
Owner

rubenv commented Sep 2, 2015

Am currently traveling but will do so soon. Thanks for picking this up!
On Sep 2, 2015 8:16 AM, "Fredrik Wollsén" [email protected] wrote:

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.


Reply to this email directly or view it on GitHub
#18 (comment)
.

@piernik
Copy link

piernik commented Sep 12, 2015

+1

@voznik
Copy link

voznik commented Sep 12, 2015

@motin, great simple solution

@rubenv
Copy link
Owner

rubenv commented Sep 16, 2015

I've pushed a v4 branch, pull requests are welcome. Once this branch is stable, we'll merge it to master and we'll split off a maintenance branch for the older select2 variant.

@piernik
Copy link

piernik commented Oct 5, 2015

What about v4 support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants