Ng-bootstrap NgbTypeahead How to respond to a choice?

Using the typeahead control allows the user to select a term from the list ( Documentation , plnkr ).

How can I respond to a choice? I was able to respond to input by adding an event (keyup.enter) to the input, then I will call another method on my component, but I cannot get an event that fires when a mouse is selected in the typeahead popup.

How can i achieve this?

0
source share
1 answer

There is an output selectItem(event) that is fired when the user makes an item selection (regardless of the selection method). The output selectItemis part of the official documentation like: https://ng-bootstrap.imtqy.com/#/components/typeahead

+2
source

Source: https://habr.com/ru/post/1673162/


All Articles