angular version: AngularJS v1.3.6 http://github.com/angular-ui/ui-select : Version: 0.8.3
var p1 = { name: 'Ramesh', email: '[email protected]', age: 99 };
$scope.people = [
{ name: 'Amalie', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f6979b979a9f93b6939b979f9ad895999b">[email protected]</a>', age: 12 },
{ name: 'Wladimir', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d0a7bcb1b4b9bdb9a290b5bdb1b9bcfeb3bfbd">[email protected]</a>', age: 30 },
{ name: 'Samantha', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8dfeece0ece3f9e5eccde8e0ece4e1a3eee2e0">[email protected]</a>', age: 31 },
{ name: 'Estefanía', email: 'estefaní<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="016041646c60686d2f626e6c">[email protected]</a>', age: 16 },
{ name: 'Natasha', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5b353a2f3a28333a1b3e363a323775383436">[email protected]</a>', age: 54 },
{ name: 'Adrian', email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="432227312a222d03262e222a2f6d202c2e">[email protected]</a>', age: 21 },
p1
];
$scope.people.selected = p1 ;
html:
<ui-select class="full-width-select select" ng-model="people.selected" theme="select2">
<ui-select-match allow-clear="false">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="person in people | filter:$select.search">
<div ng-bind-html="person.name | highlight: $select.search"></div>
</ui-select-choices>
</ui-select>
Issue is When p1 is selected programatically the
p1 object is not highlighted in the ui-select drop down.
Output is: