1

I have this select :

<select ng-model="myModel" ng-options="currentFruit.id as currentFruit.nom for currentFruit in transports | orderBy: 'name'" >
</select>

When I type 'O', the first element of my list starting by 'O' appears at the bottom of the list, and then I need to scroll down to see the next items starting by 'O'.
I would like that the first element starting by 'O' to appear at the top of the list.
Is it possible?

I hope I am being clear......

enter image description here

Thanks for your help.

user1260928
  • 3,269
  • 9
  • 59
  • 105
  • Possible duplicate of [AngularJs UI typeahead match on leading characters](http://stackoverflow.com/questions/18429967/angularjs-ui-typeahead-match-on-leading-characters) – Thiyagu Nov 17 '15 at 14:36

1 Answers1

0

This isn't an Angular specific question. That is default browser select menu functionality. Since it's handled almost entirely by the browser it's not possible to manipulate it as you would like to.

To achieve what you're trying to do you would either need to find a custom select menu plugin or to build your own one. Custom select dropdowns are re-created with divs and styled to look like a select menu dropdown. I'm not sure which custom select menus would give you the functionality you're looking for though, you would have to search around.

Jamy
  • 901
  • 8
  • 12