angular-ui / ui-select

AngularJS-native version of Select2 and Selectize
MIT License
3.26k stars 1.81k forks source link

Tagging without multiple with new tags doesn't works when using angularjs 1.3.2 #890

Open larrybolt opened 9 years ago

larrybolt commented 9 years ago

When using angularjs 1.3.2 tagging without multiple doesn't work for new items that are not added to the array. I've also tried editing demo-tagging.html, by replacing the angularjs libraries with following:

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular-sanitize.js"></script>

And it seems to confirm something changed in the 1.3.2 to break this feature.

I'm really hoping there's an easy fix for this :disappointed: as this feature was exactly what I needed.

larrybolt commented 9 years ago

And just trying to use angularjs 1.3.0 on the app I'm working on does run the tagging function, but doesn't seem to pass any arguments such as the new object.

$scope.tagTransform = function (newTag) {
    console.log("new tag", newTag, arguments);
    // ...
  };
grebett commented 9 years ago

I've written a quick workaround you can find there. Not sure it's good enough for a pull request but may do the job for the while.

BipulKumarChoudhary commented 9 years ago

I am facing the same issue , tagging is not happening with above mentioned code using angularjs 1.3.2

karptonite commented 9 years ago

I actually see this same problem in 1.3.1 as well. Works fine in 1.3.0.

guilhermerocha commented 9 years ago

I'm facing the same problem.

ghost commented 9 years ago

same problem here you can reproduce the problem in the official example

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

by changing the angular version in line 21 from <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"></script> to <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.js"></script> now tagging of a single-select isn't working anymore i also tried <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-rc.2/angular.min.js"></script> and it's not working

Sitaxa commented 9 years ago

Same problem here. Any issue ? (1.3.16/angular.js)

sukantary commented 9 years ago

I'm facing the same problem. Please help

karptonite commented 9 years ago

This temporary fix worked for me: https://github.com/angular-ui/ui-select/issues/983#issuecomment-109948338

LeleDev commented 9 years ago

Please make tagging work also without the workaround tagging-label="false"...

fferraris commented 9 years ago

:+1:

davekr commented 8 years ago

I solved this with older version of ui-select. I am using version 0.11.0. With angular >1.3.2 it works as it's suppoused to and with angular <=1.3.2 you have to set tagging-label to "(new)" explicitly otherwise "undefined" will be shown.