Skip to content

Commit

Permalink
Merge pull request #12449 from steve3d/master
Browse files Browse the repository at this point in the history
fix: add gridStyleClass to dataview
  • Loading branch information
cetincakiroglu authored Jan 4, 2023
2 parents 6608e3d + 74f4a86 commit fc163f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/dataview/dataview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import { Subscription } from 'rxjs';
[showPageLinks]="showPageLinks"
></p-paginator>
<div class="p-dataview-content">
<div class="p-grid p-nogutter grid grid-nogutter">
<div class="p-grid p-nogutter grid grid-nogutter" [ngClass]="gridStyleClass">
<ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="paginator ? (filteredValue || value | slice: (lazy ? 0 : first):(lazy ? 0 : first) + rows) : filteredValue || value" [ngForTrackBy]="trackBy">
<ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: rowData, rowIndex: rowIndex }"></ng-container>
</ng-template>
Expand Down Expand Up @@ -147,6 +147,8 @@ export class DataView implements OnInit, AfterContentInit, OnDestroy, BlockableU

@Input() styleClass: string;

@Input() gridStyleClass: string = '';

@Input() trackBy: Function = (index: number, item: any) => item;

@Input() filterBy: string;
Expand Down

0 comments on commit fc163f5

Please sign in to comment.