Open RedJandal opened 10 years ago
I have changed the directive to always bind ng-model to the simple value returned by select2. I have also added a ui-data attribute that enables you to bind a property in your controller to the select2 data object if you need to access it.
Lets say select2 returns the object
{ id: 1, text: "My Selection" }
ng-model will equal 1 ui-data will equal
This addresses the following issue
https://github.com/angular-ui/ui-select2/issues/126
Unfortunately this change appears to break many of the tests.
I have changed the directive to always bind ng-model to the simple value returned by select2. I have also added a ui-data attribute that enables you to bind a property in your controller to the select2 data object if you need to access it.
Lets say select2 returns the object
ng-model will equal 1 ui-data will equal
This addresses the following issue
https://github.com/angular-ui/ui-select2/issues/126