Ngx-chips填充<tag-input>不会在输入焦点上发布<tag-input> HTML对象

时间:2019-09-18 03:56:06

标签: angular ngx-chips

此代码用于用

填充自动建议字段
<div *ngFor="let field of fields; let i=index">
    <label class="pt-3 font-600">{{field.label}} {{field.id}}</label>
    <tag-input
      [identifyBy]="'id'"
      [inputClass]="riProSuggestionField"
      [displayBy]="'name'"
      (onFocus)="onFocusInput($event)"
      [placeholder]="field.placeholder"
      [(ngModel)]="field.data"
      [inputId]="field.id"
      [onlyFromAutocomplete]="true"
      name="{{field.label}}"
    >
      <tag-input-dropdown
      [autocompleteObservable]="getSuggestions"
      </tag-input-dropdown>
    </tag-input>
  </div>

.ts文件上

onFocusInput(event) {
}

在此函数中,应提供<tag-input>的html对象,有人有技巧来获取此HTML对象onFocusInput吗?

0 个答案:

没有答案