Closed shanmugam-siva closed 8 years ago
Hi @shanmugam-siva, to have the behavior you want it needs a bit of time to code a solution.
The main problem is that when you filter the list (by typing something) filteredOptions
array contains less (or equals) values than the full options
array. Since the highlighted
index refers to the filtered array, you need to find the index of the selected option in the original options
array, in order to set the new highlighted value after hitting Enter.
If you like to propose a PR I'll be glad to help you and review it for you! :)
Thanks. I am trying to create new pull request with changes on my local branch but I don't have sufficient permission.
First fork the project: https://help.github.com/articles/fork-a-repo/
git clone https://github.com/<your-username>/angular-selector
Then, just create a new branch from the master branch:
git checkout -b <topic-branch-name>
or use the GitHub desktop application:
Last, but not least, create a pull request: https://github.com/indrimuska/angular-selector/pull/new/master
Hi I am using this component. It works great. I have an issue highlighting the selected item on the list. When you select an item using your mouse or up /down arrow, the selected item is highlighted when you open the list again but when you select the item by typing complete text and enter key always first item in the list is highlighted when you open the list again.
Could you please help to resolve the issue?