Angular 4 Material table highlight a row

后端 未结 7 1691
栀梦
栀梦 2020-12-08 06:14

I\'m looking for a good way to highlight the whole a row in md-table.
Should I do directive or what?



        
7条回答
  •  有刺的猬
    2020-12-08 07:00

    For material": "^7.0.3",

    use the css name in html, without the single quote, to highlight the row

     .mat-row.highlighted {
      background: lightblue;
      }
    
    
     
    
    
    
    highlight(row){
    this.selectedRowIndex = row.id;
    }
    

提交回复
热议问题