Skip to content

Commit

Permalink
TreeTable | Update docs, add missing directive
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 20, 2023
1 parent bf79add commit bba96d6
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions src/app/showcase/doc/treetable/columngroupdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Code } from '../../domain/code';
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<tr [ttRow]="rowNode">
<td>
<p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
{{ rowData.brand }}
Expand Down Expand Up @@ -237,7 +237,7 @@ export class ColumnGroupDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<tr [ttRow]="rowNode">
<td>
<p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
{{ rowData.brand }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizeexpanddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -70,7 +70,7 @@ export class ResizeExpandDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -90,7 +90,7 @@ export class ResizeExpandDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizefitdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -70,7 +70,7 @@ export class ResizeFitDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -90,7 +90,7 @@ export class ResizeFitDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columnresizescrollabledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -77,7 +77,7 @@ export class ResizeScrollableDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -102,7 +102,7 @@ export class ResizeScrollableDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/columntoggledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -82,7 +82,7 @@ export class ColumnToggleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -107,7 +107,7 @@ export class ColumnToggleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/conditionalstyledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<tr [ttRow]="rowNode" [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<td *ngFor="let col of columns; let i = index" [ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -67,7 +67,7 @@ export class ConditionalStyleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<tr [ttRow]="rowNode" [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<td *ngFor="let col of columns; let i = index" [ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -87,7 +87,7 @@ export class ConditionalStyleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<tr [ttRow]="rowNode" [ngClass]="{ 'p-highlight': rowData.size.endsWith('kb') }">
<td *ngFor="let col of columns; let i = index" [ngClass]="{ 'font-bold': col.field === 'size' && rowData.size.endsWith('kb') }">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/contextmenudoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttContextMenuRow]="rowNode">
<tr [ttRow]="rowNode" [ttContextMenuRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -93,7 +93,7 @@ export class ContextMenuDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttContextMenuRow]="rowNode">
<tr [ttRow]="rowNode" [ttContextMenuRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -117,7 +117,7 @@ export class ContextMenuDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttContextMenuRow]="rowNode">
<tr [ttRow]="rowNode" [ttContextMenuRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
12 changes: 6 additions & 6 deletions src/app/showcase/doc/treetable/dynamiccolumnsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ interface Column {
<div class="card">
<p-treeTable [value]="files" [columns]="cols" [scrollable]="true" [tableStyle]="{ 'min-width': '50rem' }">
<ng-template pTemplate="header" let-columns>
<tr [ttRow]="rowNode">
<tr>
<th *ngFor="let col of columns">
{{ col.header }}
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -60,14 +60,14 @@ export class DynamicColumnsDoc implements OnInit {
basic: `
<p-treeTable [value]="files" [columns]="cols" [scrollable]="true" [tableStyle]="{'min-width':'50rem'}">
<ng-template pTemplate="header" let-columns>
<tr [ttRow]="rowNode">
<tr>
<th *ngFor="let col of columns">
{{ col.header }}
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -79,14 +79,14 @@ export class DynamicColumnsDoc implements OnInit {
<div class="card">
<p-treeTable [value]="files" [columns]="cols" [scrollable]="true" [tableStyle]="{'min-width':'50rem'}">
<ng-template pTemplate="header" let-columns>
<tr [ttRow]="rowNode">
<tr>
<th *ngFor="let col of columns">
{{ col.header }}
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/filterdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of cols; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -113,7 +113,7 @@ export class FilterDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of cols; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -154,7 +154,7 @@ export class FilterDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of cols; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/lazyloaddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -145,7 +145,7 @@ export class LazyLoadDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -165,7 +165,7 @@ export class LazyLoadDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/paginatorbasicdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -88,7 +88,7 @@ export class PaginatorBasicDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -108,7 +108,7 @@ export class PaginatorBasicDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/paginatorlocaledoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -88,7 +88,7 @@ export class PaginatorLocaleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -108,7 +108,7 @@ export class PaginatorLocaleDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/treetable/paginatortemplatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface Column {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down Expand Up @@ -98,7 +98,7 @@ export class PaginatorTemplateDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand All @@ -124,7 +124,7 @@ export class PaginatorTemplateDoc implements OnInit {
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr>
<tr [ttRow]="rowNode">
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i === 0"></p-treeTableToggler>
{{ rowData[col.field] }}
Expand Down
Loading

0 comments on commit bba96d6

Please sign in to comment.