Skip to content

Commit

Permalink
Merge pull request #16374 from global-121/aberonni/fix-documentation-…
Browse files Browse the repository at this point in the history
…for-filter-multiselect

doc: fix documentation for table-> filter multiselect
  • Loading branch information
cetincakiroglu authored Sep 26, 2024
2 parents e0f2d9e + 21de1eb commit a773686
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions src/app/showcase/doc/table/customersdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import { Table } from 'primeng/table';
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -99,7 +99,7 @@ import { Table } from 'primeng/table';
<p-sortIcon field="status" />
<p-columnFilter field="status" matchMode="equals" display="menu" class="ml-auto">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.label" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down Expand Up @@ -307,7 +307,7 @@ export class CustomersDoc {
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -339,7 +339,7 @@ export class CustomersDoc {
<p-sortIcon field="status" />
<p-columnFilter field="status" matchMode="equals" display="menu" class="ml-auto">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.label" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down Expand Up @@ -469,7 +469,7 @@ export class CustomersDoc {
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -501,7 +501,7 @@ export class CustomersDoc {
<p-sortIcon field="status" />
<p-columnFilter field="status" matchMode="equals" display="menu" class="ml-auto">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.label" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down
14 changes: 7 additions & 7 deletions src/app/showcase/doc/table/filteradvanceddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { CustomerService } from '../../service/customerservice';
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -74,7 +74,7 @@ import { CustomerService } from '../../service/customerservice';
Status
<p-columnFilter field="status" matchMode="equals" display="menu">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.value" [severity]="getSeverity(option.label)"></p-tag>
</ng-template>
Expand All @@ -88,7 +88,7 @@ import { CustomerService } from '../../service/customerservice';
Activity
<p-columnFilter field="activity" matchMode="between" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-slider [(ngModel)]="value" [range]="true" styleClass="m-3" (onSlideEnd)="filter($event.values)" />
<p-slider [ngModel]="value" [range]="true" styleClass="m-3" (onSlideEnd)="filter($event.values)" />
<div class="flex align-items-center px-2">
<span *ngIf="!value">0</span>
<span *ngIf="value">{{ value[0] }} - {{ value[1] }}</span>
Expand Down Expand Up @@ -261,7 +261,7 @@ export class FilterAdvancedDoc {
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -290,7 +290,7 @@ export class FilterAdvancedDoc {
Status
<p-columnFilter field="status" matchMode="equals" display="menu">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.value" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down Expand Up @@ -401,7 +401,7 @@ export class FilterAdvancedDoc {
</div>
</ng-template>
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -430,7 +430,7 @@ export class FilterAdvancedDoc {
Status
<p-columnFilter field="status" matchMode="equals" display="menu">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.value" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down
12 changes: 6 additions & 6 deletions src/app/showcase/doc/table/filterbasic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { CustomerService } from '@service/customerservice';
<th>
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand All @@ -68,7 +68,7 @@ import { CustomerService } from '@service/customerservice';
<th>
<p-columnFilter field="status" matchMode="equals" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown [(ngModel)]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Select One" [showClear]="true">
<p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Select One" [showClear]="true">
<ng-template let-option pTemplate="item">
<p-tag [value]="option.value" [severity]="getSeverity(option.label)" />
</ng-template>
Expand Down Expand Up @@ -235,7 +235,7 @@ export class FilterBasicDoc {
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect
[(ngModel)]="value"
[ngModel]="value"
[options]="representatives"
placeholder="Any"
(onChange)="filter($event.value)"
Expand All @@ -258,7 +258,7 @@ export class FilterBasicDoc {
<p-columnFilter field="status" matchMode="equals" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown
[(ngModel)]="value"
[ngModel]="value"
[options]="statuses"
(onChange)="filter($event.value)"
placeholder="Select One"
Expand Down Expand Up @@ -370,7 +370,7 @@ export class FilterBasicDoc {
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect
[(ngModel)]="value"
[ngModel]="value"
[options]="representatives"
placeholder="Any"
(onChange)="filter($event.value)"
Expand All @@ -394,7 +394,7 @@ export class FilterBasicDoc {
<p-columnFilter field="status" matchMode="equals" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-dropdown
[(ngModel)]="value"
[ngModel]="value"
[options]="statuses"
(onChange)="filter($event.value)"
placeholder="Select One"
Expand Down
6 changes: 3 additions & 3 deletions src/app/showcase/doc/table/lazyloaddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { CustomerService } from '@service/customerservice';
<th>
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<p-multiSelect [ngModel]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -200,7 +200,7 @@ export class LazyLoadDoc implements OnInit {
<th>
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<p-multiSelect [ngModel]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down Expand Up @@ -266,7 +266,7 @@ export class LazyLoadDoc implements OnInit {
<th>
<p-columnFilter field="representative" matchMode="in" [showMenu]="false">
<ng-template pTemplate="filter" let-value let-filter="filterCallback">
<p-multiSelect [(ngModel)]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<p-multiSelect [ngModel]="value" appendTo="body" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name" [maxSelectedLabels]="1" [selectedItemsLabel]="'{0} items'">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="option.label" src="https://primefaces.org/cdn/primeng/images/demo/avatar/{{ option.image }}" width="24" class="vertical-align-middle" />
Expand Down

0 comments on commit a773686

Please sign in to comment.