Skip to content

Update table-row-context-example.html #18674

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

Merged
merged 1 commit into from
Mar 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<table mat-table [dataSource]="data" class="mat-elevation-z8">
<!-- Index Column -->
<!-- Implicit Column -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should stay as "Index"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But already exists the index column, do you can see in the images. Implicity is another column.
image
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought that $implicit was index here, but I was mistaken

<ng-container matColumnDef="$implicit">
<th mat-header-cell *matHeaderCellDef> $implicit </th>
<td mat-cell *matCellDef="let data"> {{data}} </td>
Expand All @@ -11,31 +11,31 @@
<td mat-cell *matCellDef="let index = index"> {{index}} </td>
</ng-container>

<!-- Index Column -->
<!-- Count Column -->
<ng-container matColumnDef="count">
<th mat-header-cell *matHeaderCellDef> count </th>
<td mat-cell *matCellDef="let count = count"> {{count}} </td>
</ng-container>

<!-- Index Column -->
<!-- First Column -->
<ng-container matColumnDef="first">
<th mat-header-cell *matHeaderCellDef> first </th>
<td mat-cell *matCellDef="let first = first"> {{first}} </td>
</ng-container>

<!-- Index Column -->
<!-- Last Column -->
<ng-container matColumnDef="last">
<th mat-header-cell *matHeaderCellDef> last </th>
<td mat-cell *matCellDef="let last = last"> {{last}} </td>
</ng-container>

<!-- Index Column -->
<!-- Even Column -->
<ng-container matColumnDef="even">
<th mat-header-cell *matHeaderCellDef> even </th>
<td mat-cell *matCellDef="let even = even"> {{even}} </td>
</ng-container>

<!-- Index Column -->
<!-- Odd Column -->
<ng-container matColumnDef="odd">
<th mat-header-cell *matHeaderCellDef> odd </th>
<td mat-cell *matCellDef="let odd = odd"> {{odd}} </td>
Expand Down