I've recently upgraded from angular 1.1.4 up to 1.2.9, and grabbed the latest ui-select2 directive and the latest select2 component. My select2s in tag mode have stopped working. The options list and typeahead work, but when I select anything from it, the new tag shows up as a blank thing with no value, and debugging it, I see it is getting sliced from {text: "foo", id: 10} just down to 10 - the object is being replaced with the id. I'd really appreciate any insight on why this is happening.
Demo: http://plnkr.co/edit/RepMSFQsIPDuPTNFWKUN?p=preview
Here are my select2 options:
.controller('AppController', function($scope) {
availableTags = [
{text: 'Apple', id: 1},
{text: 'Apricot', id: 2},
{text: 'Avocado', id: 3},
];
$scope.select2Options = {
tags: availableTags,
multiple: true,
minimumInputLength: 1,
formatResult: function (item) {
return item.text;
},
formatSelection: function (item) {
return item.text;
},
}