mgcrea / angular-strap

AngularJS 1.2+ native directives for Bootstrap 3.
mgcrea.github.io/angular-strap
MIT License
5.73k stars 1.38k forks source link

angular strap typeahead filter otions issue #2272

Closed SERGEES closed 5 years ago

SERGEES commented 6 years ago

I have array for typeahead:

$scope.icons = [ {value: 'idGear', label: 'Gear'}, {value: 'idGlobe', label: 'Globe'}, {value: 'oidHeart', label: 'Heart'}, {value: 'camera', label: 'Camera'} ]; and want to filter array on label so I added:

bs-options="icon.value as icon.label for icon in icons|filter:{label:$viewValue}"

but when I select first item in input I see value(idGear) but not label (Gear) It works fine for last item {value: 'camera', label: 'Camera'} if value is allmoust the same as label

here is planker with issue demonstartion http://plnkr.co/edit/blXEtsCG9RRBctkniHAW?p=preview

Thanks for any help.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SERGEES commented 5 years ago

still an issue

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.