ui-select icon indicating copy to clipboard operation
ui-select copied to clipboard

ui-select broken with angular 1.5.0 beta2

Open LeleDev opened this issue 11 years ago • 46 comments

Ui-select doesn't work with latest angularjs updates

LeleDev avatar Nov 26 '15 15:11 LeleDev

Is this related with #1128?

CrlsMrls avatar Nov 27 '15 16:11 CrlsMrls

It seems not

LeleDev avatar Nov 27 '15 18:11 LeleDev

In what is it broken? Updating the examples to use 1.4.8 seem to work just fine. Since I intend to use this in a production environment it would be very helpful if anyone can provide more info. Thanks.

http://plnkr.co/edit/4EsCcN8z3OZKYM1qjp84?p=preview http://plnkr.co/edit/sFPmLg13rXqMuRLI7jqh?p=preview

crissdev avatar Nov 28 '15 14:11 crissdev

Ok you are right, with 1.4.8 is working, only with 1.5.0 beta2 I get the following error:

Error: [ui.select:transcluded] http://errors.angularjs.org/1.5.0-beta.2/ui.select/transcluded?p0=Expected%201%20.ui-select-match%20but%20got%20'%7B0%7D'.&p1=0
    at http://localhost:9001/src/app/app_files/bower_components/ui-select/dist/select.js:119:12
    at http://localhost:9001/src/app/app_files/bower_components/ui-select/dist/select.js:972:19
    at http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:55:319
    at http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:60:159
    at O.d (http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:57:164)
    at k (http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:62:248)
    at http://localhost:9001/src/app/app_files/bower_components/ui-select/dist/select.js:960:9
    at ea (http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:76:209)
    at w (http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:64:64)
    at http://localhost:9001/src/app/app_files/bower_components/angular/angular.min.js:72:176

The problem if you use this library for production is that it seems to have been quite abandoned from the maintaners... I regret to have chosen this library for my project due to the lack of support (that's why also I'm lazy to report broken stuff in the proper way, since nobody seems to really care about it)

LeleDev avatar Nov 28 '15 16:11 LeleDev

@LeleDev Thanks for your feedback. I hope to find some good alternatives without messing around with $apply. Please let me know if you know about some of them :-)

crissdev avatar Nov 28 '15 19:11 crissdev

You could give a try to the old ui-select directive repository code (when it was a wrapper for the nice select2 library: https://github.com/select2/select2) at this page: https://github.com/angular-ui/ui-select2/blob/master/src/select2.js

Unluckily there aren't many good alternative to ui-select that work out of the box... so I'm afraid that you will have to gamble and stick to this one, hoping that some new maintainers will be assigned to the project from the angular-ui team...

LeleDev avatar Nov 30 '15 09:11 LeleDev

It seems to have been caused by this change for 1.5.0-beta.1 Lazily compile the transclude function

You can prove it by setting eager=true in the debugger.

nickmorton avatar Nov 30 '15 14:11 nickmorton

Moderator note:

This workaround should no longer be required in ui-select v0.14.3+


The workaround is really simple.

Add class to ui-select-match and ui-select-choices with the same name

See the diff @ https://github.com/inetsys/ng-formalizer/commit/e18630297a50efaf0bb629cb26cfc6eea1d841d5

llafuente avatar Dec 01 '15 10:12 llafuente

Nice one! Works for me.

nickmorton avatar Dec 01 '15 11:12 nickmorton

@llafuente It works, but WHY?

Luddinus avatar Dec 07 '15 12:12 Luddinus

Select2 theme does not works (it does not show the search icon etc.)

Luddinus avatar Dec 07 '15 13:12 Luddinus

I have the same problem with angular-1.5.0-rc.0 I opened an issue for them here: https://github.com/angular/angular.js/issues/13527

bogdanalexe90 avatar Dec 13 '15 19:12 bogdanalexe90

@llafuente Thanks for the easy workaround. Works for me with angular-1.5.0-rc.0.

steambros avatar Dec 16 '15 01:12 steambros

Thanks @llafuente, Works for me with AngularJS v1.5.0-rc.0 :+1:

brunolimawd avatar Dec 21 '15 17:12 brunolimawd

Hi, just checking if there are any plans to resolve within ui-select without using the work-around described above, as the Angular issue has been moved to the Ice Box.

amantilas avatar Dec 22 '15 21:12 amantilas

@llafuente Thanks for the easy/crazy workaround. Works for me with angular-1.5.0-rc.0.

kurtommy avatar Jan 06 '16 08:01 kurtommy

Had difficulties getting bootstrap theme to work with angular-1.5.0-rc.0 . Finally got it.

Here's a working Plunker if others still have problems.

http://plnkr.co/edit/bpSBAZzS8BVIK4roTFLd?p=preview

valterkraemer avatar Jan 17 '16 21:01 valterkraemer

+1 here

chrisvel avatar Feb 05 '16 15:02 chrisvel

this is still happening in the 1.5.0 release :(

captura de pantalla de 2016-02-05 17 21 43

CesarLanderos avatar Feb 05 '16 23:02 CesarLanderos

The workaround from @llafuente still works with the 1.5.0. Thanks for sharing!

ConcurrentHashMap avatar Feb 06 '16 21:02 ConcurrentHashMap