ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 122 forks source link

Execute event on only 1 suggestion left #382

Closed Fideon closed 4 years ago

Fideon commented 4 years ago

Say we have 10 records in our source. We start typing in one of these records and the list starts to get filtered. Once our record matches only one suggestion, that suggestion should be auto-selected

Current behavior

Expected/desired behavior

I've been thinking of using key-up events, and compare against my source, but comparing each keystroke wouldn't be very efficient. I was thinking of an event that can be executed when a certain amount of suggestions is left.