Skip to content

Request for snippet m-table display flex #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Toso82 opened this issue Dec 28, 2019 · 2 comments
Open

Request for snippet m-table display flex #125

Toso82 opened this issue Dec 28, 2019 · 2 comments
Milestone

Comments

@Toso82
Copy link

Toso82 commented Dec 28, 2019

https://material.angular.io/components/table/overview#tables-with-code-display-flex-code-

<mat-table [dataSource]="dataSource">
  <!-- User name Definition -->
  <ng-container cdkColumnDef="username">
    <mat-header-cell *cdkHeaderCellDef> User name </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.username}} </mat-cell>
  </ng-container>

  <!-- Age Definition -->
  <ng-container cdkColumnDef="age">
    <mat-header-cell *cdkHeaderCellDef> Age </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.age}} </mat-cell>
  </ng-container>

  <!-- Title Definition -->
  <ng-container cdkColumnDef="title">
    <mat-header-cell *cdkHeaderCellDef> Title </mat-header-cell>
    <mat-cell *cdkCellDef="let row"> {{row.title}} </mat-cell>
  </ng-container>

  <!-- Header and Row Declarations -->
  <mat-header-row *cdkHeaderRowDef="['username', 'age', 'title']"></mat-header-row>
  <mat-row *cdkRowDef="let row; columns: ['username', 'age', 'title']"></mat-row>
</mat-table>
@BeastCode
Copy link
Owner

Good idea, let me know if you want to work on a pr with changes to html.json or if you want help.

thanks

@Toso82
Copy link
Author

Toso82 commented Jan 3, 2020

Thanks @BeastCode I add pull of request of this. But How test your extension before publish?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants