Skip to content

Commit

Permalink
fix(demo): migrate tui-table classes from filter pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
shiv9604 committed Dec 18, 2024
1 parent ab14e52 commit 143e782
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
21 changes: 13 additions & 8 deletions projects/demo/src/modules/pipes/filter/examples/1/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<table class="tui-table table">
<thead>
<tr>
<th class="tui-table__th cell_name">Name</th>
<th class="tui-table__th cell_sum">Sum, $</th>
<table
tuiTable
[style.width.rem]="17"
>
<thead tuiThead>
<tr tuiThGroup>
<th tuiTh>Name</th>
<th tuiTh>Sum, $</th>
</tr>
</thead>
<tbody tuiTbody>
<tr *ngFor="let item of items | tuiFilter: matcher : 300">
<td class="tui-table__td cell_name">{{ item.name }}</td>
<td class="tui-table__td cell_sum">{{ item.price }}</td>
<td tuiTd>{{ item.name }}</td>
<td tuiTd>{{ item.price }}</td>
</tr>
</thead>
</tbody>
</table>
10 changes: 10 additions & 0 deletions projects/demo/src/modules/pipes/filter/examples/1/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import '@taiga-ui/core/styles/taiga-ui-local';

[tuiTh],
[tuiTd] {
border: none;
}

[tuiTd] {
font: var(--tui-font-text-m) !important;
}
20 changes: 19 additions & 1 deletion projects/demo/src/modules/pipes/filter/examples/1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import {NgForOf} from '@angular/common';
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {
TuiTable,
TuiTableHead,
TuiTableTbody,
TuiTableTd,
TuiTableTh,
TuiTableThGroup,
} from '@taiga-ui/addon-table';
import {TuiFilterPipe} from '@taiga-ui/cdk';

export interface Item {
Expand All @@ -11,8 +19,18 @@ export interface Item {

@Component({

Check failure on line 20 in projects/demo/src/modules/pipes/filter/examples/1/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Order in imports should be [NgForOf, TuiFilterPipe, TuiTable, TuiTableHead, TuiTableTbody, TuiTableTd, TuiTableTh, TuiTableThGroup]
standalone: true,
imports: [NgForOf, TuiFilterPipe],
imports: [
NgForOf,
TuiFilterPipe,
TuiTable,
TuiTableHead,
TuiTableThGroup,
TuiTableTh,
TuiTableTbody,
TuiTableTd,
],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
changeDetection,
})
Expand Down

0 comments on commit 143e782

Please sign in to comment.