primeng icon indicating copy to clipboard operation
primeng copied to clipboard

highlightFirst property to AutoComplete

Open reinpeter opened this issue 9 years ago • 2 comments

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[x ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior With autoHighlight option set to true in the autocomplete, the first option is always selected.

Expected behavior It would be nice and more intuitive for the user, that the current selected option in the autocomplete is highlighted in the suggestion box.

What is the motivation / use case for changing the behavior? More intuitive for the user.

Implementation hint, by updating the handleSuggestionsChange function, replace "this.highlightOption = this._suggestions[0];" with a search loop on all suggestions and assignment. Assign first element if current item not found.

reinpeter avatar Sep 26 '17 12:09 reinpeter

There is autoHighlight prop for this.

cagataycivici avatar Oct 25 '17 06:10 cagataycivici

@cagataycivici i know there is an autoHightLight prop. But this selects FIRST option. I would like the option to select the CURRENT selected option.

reinpeter avatar Oct 25 '17 07:10 reinpeter