【问题标题】:Checkbox issue in the mat table-Angular7垫表中的复选框问题-Angular7
【发布时间】:2019-10-03 14:51:16
【问题描述】:

当我们选择一个新的时,mat table 中先前选中的复选框不会被计算在内。由标题中的单个复选框处理的整个复选框列选择不考虑新选中或未选中的数据。

【问题讨论】:

    标签: javascript checkbox angular-material angular7


    【解决方案1】:

    为了解决这个问题,我们必须在 component.ts 文件中的选择中传递索引位置:

    例如:

    selection = new SelectionModel<PeriodicElement>(true, [this.dataSource.filteredData[1]);
    

    【讨论】:

      猜你喜欢
      • 2020-02-06
      • 1970-01-01
      • 2020-04-05
      • 1970-01-01
      • 2018-03-31
      • 1970-01-01
      • 2011-08-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多