搜索事件未在@ng选择/ng-select中触发


<ng-select class="custom" [items]="ingredientsSearchList" bindLabel="name" bindValue="value" placeholder="Search ingredients/your products" (search)="onSearch($event)" loadingText="Searching">
</ng-select>

是我的代码。但奇怪的是,除了搜索事件之外,所有输出事件(如模糊等(都被触发。作为解决方法,我使用(keyup(事件来触发相同的事件。我是否犯了不触发搜索事件的任何错误。

请确保您使用的是 v2.8.0。此版本支持搜索事件。

最新更新