md-table - How to update the column width

后端 未结 18 2152
离开以前
离开以前 2020-12-04 10:58

I have started using the md-table for my project, and I want fixed column width. Currently all columns width are divided into equal size.

Where can I get the documen

18条回答
  •  情歌与酒
    2020-12-04 11:28

    If you are using angular/flex-layout in your project, you can set column with by adding fxFlex directive to mat-header-cell and mat-cell:

     
          Name
          {{row.Name}}
     
    

    Otherwise, you can add custom CSS to achieve the same result:

    .mat-column-name{
        flex: 0 0 100px;
    }
    

提交回复
热议问题