如何解决角度剑道自动完成未调用span上的click事件
我想从下拉列表中选择值,并且我有一种特定的格式来显示使用跨度的值,并且跨度具有click事件,该事件为我提供了值,但是有些出问题了。 谁能告诉我为什么跨度内的click方法没有在点击时被调用?
<div class="col-sm-12 bottom" position="bottom" tooltipClass="tooltip-style">
<kendo-autocomplete
id="qa-profile"
[data]="rqstUseRSSearch"
title="{{selectedProfileUID}}"
[placeholder]="'Search for Profile'"
[(ngModel)]="selectedProfileUID"
[filterable]="true"
[valueField]="'fullName'"
(filterChange)="handleProfileFilter($event)"
>
<ng-template kendoComboBoxItemTemplate let-dataItem >
<span (click)="getPID(dataItem)">
{{ dataItem.fullName }} <br/> {{ dataItem.ProfileUID }}
</span>
</ng-template>
<ng-template kendoComboBoxNoDataTemplate >
<p *ngIf="isLengthvalid" class="combooxPopup">
To search for Profile,please enter at least 2 characters
</p>
</ng-template>
</kendo-autocomplete>
<div *ngIf="profileUIDNotEntered" class="invalid-Feedback">
<span>Profile is required</span>
</div>
component.ts代码
getPID(dataItem) {
this.isProfileUID = true;
this.userProfileUID = dataItem.ProfileUID;
console.log('clicked for selecting user',this.userProfileUID);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。