Mat-chip关键事件问题

问题描述

我检测到,在移动设备中的反应形式内使用片状芯片时,存在两个问题:

当我按ENTER键时,改为添加该芯片,结果是我转到下一个输入字段 当我按COMMA键时,改为添加此mat-chip,结果是我在mat-chip中添加了“,” 台式机不存在这两个问题

其他信息: 角核:7.2.1

角材料:7.2.1

测试示例(如果您从手机打开): http://angular-material.fusetheme.com/apps/e-commerce/products/1/printed-dress

反应式内垫芯片的代码示例:

<mat-chip-list #valuesChipList name="values" formControlName="values">
   <mat-chip [disabled]="!editing" *ngFor="let value of form.get('values').value" [removable]="true"
                  (removed)="removeValue(value)">
                  {{value.name}}
     <mat-icon matChipRemove *ngIf="editing">cancel</mat-icon>
   </mat-chip>
  <input [readonly]="!editing" [matChipInputFor]="valuesChipList [matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="true" (matChipInputTokenEnd)="addValue($event)">
 </mat-chip-list>

SeparatorKeysCodes:

readonly separatorKeysCodes: number[] = [ENTER,COMMA];

有人能解决这些问题吗?

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...