ng-bootstrap NgbTypeahead How to react on select?

2019-09-18 14:46发布

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

How can I react on a selection? I managed to react on enter by adding a (keyup.enter) event to the input then call another method on my component, but I cannot seem to get an event that fires on mouse-selection in the typeahead-popup.

How can I achieve that?

1条回答
再贱就再见
2楼-- · 2019-09-18 14:54

There is the selectItem output (event) that is fired when a user does item selection (regardless of the selection method). The selectItem output is part of the official typeahead documentation

查看更多
登录 后发表回答