|
9 | 9 | <div class="flex flex-column gap-4 w-full"> |
10 | 10 | <h3>{{ 'collections.addToCollection.collectionMetadata' | translate }}</h3> |
11 | 11 |
|
12 | | - @if (!isDisabled() && stepperActiveValue() !== targetStepValue()) { |
| 12 | + @if (!isDisabled() && !isStepActive()) { |
13 | 13 | @if (collectionMetadataSaved()) { |
14 | 14 | @if (isCedarMode()) { |
15 | | - @if (cedarTemplate()) { |
| 15 | + @let cedarTpl = cedarTemplate(); |
| 16 | + |
| 17 | + @if (cedarTpl) { |
16 | 18 | <cedar-artifact-viewer |
17 | 19 | #cedarViewer |
18 | 20 | [config]="cedarViewerConfig" |
19 | | - [templateObject]="cedarTemplate()!.attributes.template" |
20 | | - [instanceObject]="cedarFormData()" |
| 21 | + [templateObject]="cedarTpl.attributes.template" |
21 | 22 | ></cedar-artifact-viewer> |
22 | 23 | } |
23 | 24 | } @else { |
@@ -45,19 +46,23 @@ <h3>{{ 'collections.addToCollection.collectionMetadata' | translate }}</h3> |
45 | 46 | </p-step> |
46 | 47 |
|
47 | 48 | <p-step-panel [value]="targetStepValue()" class="p-0"> |
48 | | - <ng-template class="m-0" #content let-activateCallback="activateCallback"> |
| 49 | + <ng-template #content> |
49 | 50 | @if (isCedarMode()) { |
50 | | - @if (cedarTemplate()) { |
51 | | - <div class="cedar-editor-container mt-3"> |
52 | | - <cedar-embeddable-editor |
53 | | - #cedarEditor |
54 | | - [config]="cedarConfig" |
55 | | - [templateObject]="cedarTemplate()!.attributes.template" |
56 | | - [metadata]="cedarFormData()" |
57 | | - (change)="onCedarChange($event)" |
58 | | - (keyup)="onCedarChange($event)" |
59 | | - ></cedar-embeddable-editor> |
60 | | - </div> |
| 51 | + @let cedarTpl = cedarTemplate(); |
| 52 | + |
| 53 | + @if (cedarTpl) { |
| 54 | + @if (isStepActive()) { |
| 55 | + <div class="cedar-editor-container mt-3"> |
| 56 | + <cedar-embeddable-editor |
| 57 | + #cedarEditor |
| 58 | + [config]="cedarConfig" |
| 59 | + [templateObject]="cedarTpl.attributes.template" |
| 60 | + [metadata]="cedarFormData()" |
| 61 | + (change)="onCedarChange($event)" |
| 62 | + (keyup)="onCedarChange($event)" |
| 63 | + ></cedar-embeddable-editor> |
| 64 | + </div> |
| 65 | + } |
61 | 66 |
|
62 | 67 | <div class="flex justify-content-end gap-3 mt-4"> |
63 | 68 | <p-button |
|
0 commit comments