angular - 在不打开下拉菜单的情况下触发 ng-select on-blur 事件
问题描述
我ng-select
在我的项目中使用过,但是只有当我从下拉列表中选择选项时才会触发 onblur 事件,这就是我所拥有的,
<ng-select [addTag]="true" [editableSearchTerm]="true" [items]="multiples['document_id']" bindValue="name" bindLabel="name"
[multiple]="false" [maxSelectedItems]="1" [clearSearchOnAdd]="true" placeholder="Select or type"
[searchable]="true" [(ngModel)]="outputQipJson.document_id"
*ngIf="editable && editablefeildname =='document_id'" (blur)="focusOutFunction('document_id');"
(change)="onSelectQip('document_id', $event)" style="font-size: 11px;" name="document_id"
#document_id>
</ng-select>
如果我想在不打开下拉菜单的情况下从 ng-select 聚焦时触发 onblur,我该怎么办?
版本:
"@ng-select/ng-select": "^3.7.3",
"@angular/core": "~10.1.0",
解决方案
推荐阅读
- localization - 您对基于 sy-langu 的语言屏蔽有何看法
- python - 如果 dict 为 None,则不要为 dict 添加值
- rust - MQTT 与 tokio 的连接
- rabbitmq - 带有 RabbitMQ 的 MassTransit - 在另一次总线重新启动后发布异常
- kotlin - Kotlin 对 JVM 性能有何影响?
- android - 升级后立即膨胀正在进行的通知布局时崩溃。仅限安卓 10
- c# - MVC - 将数据库表动态绑定到 var
- javascript - 按值过滤由对象组成的对象的元素,vanilla JS
- jboss - JBoss HornetQ/ActiveMQ Artemis 将队列消息保存到文件系统
- java - ClassNode 上的 Java ASM CheckClassAdapter