-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PrimeNG v17: Fix p-dataview breaking change (#29658)
### Parent Issue #29657 ### Proposed Changes * Fix error with breaking change by PrimeNg V17 upgrade > gridItem and listItem templates are deprecated and will removed in the future, use list and grid templates instead. ### Checklist - [x] Tests - [x] Translations - [x] Security Implications Contemplated (add notes if applicable) ### Screenshots v15 | v17 :-------------------------:|:-------------------------: ![Screenshot 2024-08-20 at 9 25 49 AM](https://github.com/user-attachments/assets/b0c302b6-d9f4-4a52-afc9-203c6da9fba3) | ![Screenshot 2024-08-20 at 9 25 34 AM](https://github.com/user-attachments/assets/a12c2e74-fe1a-499b-a2e7-0a16679c02b4) ![Screenshot 2024-08-09 at 6 39 25 PM](https://github.com/user-attachments/assets/f5996809-2f38-4d77-8de6-6f7edfe8004c) | ![Screenshot 2024-08-09 at 6 10 06 PM](https://github.com/user-attachments/assets/1da9b0d7-82c1-41ec-a56c-4d1da87646d3) DotCMS/ThemeSelector | DotCMS/ThemeSelector ![Screenshot 2024-08-20 at 11 25 41 AM](https://github.com/user-attachments/assets/c622871a-728d-4dba-a58f-cb210c4eaed2) | ![Screenshot 2024-08-20 at 11 25 34 AM](https://github.com/user-attachments/assets/7e0e9c5b-9131-4afb-9ea6-13d824312087) ![Screenshot 2024-08-20 at 5 13 29 PM](https://github.com/user-attachments/assets/09aec08e-c638-4a08-9b12-5559d0c4faf1) | ![Screenshot 2024-08-20 at 5 11 52 PM](https://github.com/user-attachments/assets/6f886b52-ffaf-4a3d-beaa-02dedc0eaf0e) ![Screenshot 2024-08-20 at 5 13 38 PM](https://github.com/user-attachments/assets/1816f4f0-4d62-4390-b613-938390a9eba0) | ![Screenshot 2024-08-20 at 5 12 13 PM](https://github.com/user-attachments/assets/ca9baac9-98fb-4f1b-a8e9-5ce1bcde4c27)
- Loading branch information
Showing
10 changed files
with
252 additions
and
237 deletions.
There are no files selected for viewing
48 changes: 26 additions & 22 deletions
48
.../dot-container-create/dot-container-code/dot-add-variable/dot-add-variable.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
<p-dataView *ngIf="vm$ | async as vm" [value]="vm.fields" layout="list"> | ||
<ng-template let-field pTemplate="listItem"> | ||
<div class="dot-add-variable-list__item"> | ||
<div class="item__info"> | ||
<h3 [attr.data-testId]="'h3' + field.variable" class="info__title"> | ||
{{ field?.name }} | ||
</h3> | ||
<small class="info__label"> | ||
{{ field?.fieldTypeLabel }} | ||
</small> | ||
</div> | ||
<div class="item__action"> | ||
<button | ||
(click)="addCustomCode(field)" | ||
[attr.data-testId]="field.variable" | ||
[label]="'Add' | dm" | ||
class="p-button-outlined p-button-primary p-button-sm" | ||
pButton></button> | ||
</div> | ||
</div> | ||
</ng-template> | ||
</p-dataView> | ||
@if (vm$ | async; as vm) { | ||
<p-dataView [value]="vm.fields" layout="list"> | ||
<ng-template pTemplate="list" let-data> | ||
@for (item of data; track $index) { | ||
<div class="dot-add-variable-list__item"> | ||
<div class="item__info"> | ||
<h3 [attr.data-testId]="'h3' + field.variable" class="info__title"> | ||
{{ field?.name }} | ||
</h3> | ||
<small class="info__label"> | ||
{{ field?.fieldTypeLabel }} | ||
</small> | ||
</div> | ||
<div class="item__action"> | ||
<button | ||
(click)="addCustomCode(field)" | ||
[attr.data-testId]="field.variable" | ||
[label]="'Add' | dm" | ||
class="p-button-outlined p-button-primary p-button-sm" | ||
pButton></button> | ||
</div> | ||
</div> | ||
} | ||
</ng-template> | ||
</p-dataView> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.