角度剑道自动完成未调用span上的click事件

问题描述

我想从下拉列表中选择值,并且我有一种特定的格式来显示使用跨度的值,并且跨度具有click事件,该事件为我提供了值,但是有些出问题了。 谁能告诉我为什么跨度内的click方法没有在点击时被调用

HTML文件上的代码

<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 (将#修改为@)