Skip to content

Commit

Permalink
fix(comparision-table): track expression warning (#1302)
Browse files Browse the repository at this point in the history
* fix(flex-row): [ComparisonTable] track expression warning

* fix(flex-row): remove unused code

* fix(comparison-table): track expression warning
  • Loading branch information
[email protected] authored and GitHub Enterprise committed Aug 23, 2024
1 parent f1f55df commit f400dd8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- header row -->
@if (element['type'] === 'header') {
<ng-container nxComparisonTableRow type="header">
@for (cell of element['cells']; track cell) {
@for (cell of element['cells']; track $index;) {
<nx-comparison-table-cell type="header">
{{ cell }}<br />
<button
Expand Down Expand Up @@ -41,15 +41,15 @@
</nx-popover>
</div>
</nx-comparison-table-description-cell>
} @for (cell of element['cells']; track cell) {
} @for (cell of element['cells']; track $index;) {
<nx-comparison-table-cell> {{ cell }} </nx-comparison-table-cell>
}
</ng-container>
}
<!-- footer row -->
@if (element['type'] === 'footer') {
<ng-container nxComparisonTableRow type="footer">
@for (cell of element['cells']; track cell) {
@for (cell of element['cells']; track $index;) {
<nx-comparison-table-cell type="footer">
<button
nxComparisonTableSelectButton
Expand Down Expand Up @@ -93,7 +93,7 @@
</nx-popover>
</div>
</nx-comparison-table-description-cell>
}> @for (cell of row['cells']; track cell) {
}> @for (cell of row['cells']; track $index;) {
<nx-comparison-table-cell>{{ cell }}</nx-comparison-table-cell>
}
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</button>

<nx-context-menu #menu="nxContextMenu">
@for (item of [].constructor(3); track item; let i = $index) { @if (i !==
@for (item of [].constructor(3); track $index; let i = $index) { @if (i !==
selectedColumnIndex) {
<button
[disabled]="selectedColumnIndex === i"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="nx-comparison-table__cell-content"></div>
</div>
}
@for (emptyCellBeforePopular of [].constructor(row.popularCell.forColumn - 1); track emptyCellBeforePopular; let i = $index) {
@for (emptyCellBeforePopular of [].constructor(row.popularCell.forColumn - 1); track $index; let i = $index) {
<div
role="cell"
class="nx-comparison-table__placeholder-cell is-popular-placeholder-cell"
Expand All @@ -25,7 +25,7 @@
}
<!-- popular cell content -->
<ng-container *ngTemplateOutlet="row.popularCell._content"></ng-container>
@for (emptyCellAfterPopular of [].constructor(row.cells.length - row.popularCell.forColumn); track emptyCellAfterPopular; let i = $index) {
@for (emptyCellAfterPopular of [].constructor(row.cells.length - row.popularCell.forColumn); track $index; let i = $index) {
<div
role="cell"
class="nx-comparison-table__placeholder-cell is-popular-placeholder-cell"
Expand Down

0 comments on commit f400dd8

Please sign in to comment.