[ui] Fix Resource URI button not checked (#7070)

* [u] Fix Resource URI button not checked

* Generate static UI

---------

Co-authored-by: Armel Soro <asoro@redhat.com>
This commit is contained in:
Philippe Martin
2023-09-04 17:21:31 +02:00
committed by GitHub
parent 8051843d89
commit 03c109a6e2
4 changed files with 6 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
<span class="toggleUriInlined">
<mat-button-toggle-group formControlName="_choice" (change)="changeUriOrInlined($event.value)">
<mat-button-toggle data-cy="resource-toogle-uri" value="uri" checked>Specify URI</mat-button-toggle>
<mat-button-toggle data-cy="resource-toogle-uri" value="uri">Specify URI</mat-button-toggle>
<mat-button-toggle data-cy="resource-toggle-inlined" value="inlined">Inlined content</mat-button-toggle>
</mat-button-toggle-group>
</span>

View File

@@ -78,6 +78,9 @@ export class ResourceComponent {
if (res['inlined']) {
this.form.get('_choice')?.setValue('inlined');
this.changeUriOrInlined('inlined');
} else {
this.form.get('_choice')?.setValue('uri');
this.changeUriOrInlined('uri');
}
this.form.get('name')?.disable();
}