Browse Source

Fix tags in read-only mode

pull/7461/head
Thomas Kaul 1 month ago
parent
commit
1c23c43a0f
  1. 12
      libs/ui/src/lib/tags-selector/tags-selector.component.html

12
libs/ui/src/lib/tags-selector/tags-selector.component.html

@ -3,22 +3,20 @@
@if (readonly) { @if (readonly) {
<div class="h5" i18n>Tags</div> <div class="h5" i18n>Tags</div>
@if ( @if (
(tags && tags.length > 0) || (tagsReadOnly && tagsReadOnly.length > 0) tagsSelected().length > 0 || (tagsReadOnly && tagsReadOnly.length > 0)
) { ) {
<mat-chip-listbox> <mat-chip-listbox>
@if (tagsReadOnly) { @if (tagsReadOnly) {
@for (tag of tagsReadOnly; track tag) { @for (tag of tagsReadOnly; track tag.id) {
<mat-chip-option disabled>{{ tag.name }}</mat-chip-option> <mat-chip-option disabled>{{ tag.name }}</mat-chip-option>
} }
} }
@if (tags) { @for (tag of tagsSelected(); track tag.id) {
@for (tag of tags; track tag) { <mat-chip-option disabled>{{ tag.name }}</mat-chip-option>
<mat-chip-option disabled>{{ tag.name }}</mat-chip-option>
}
} }
</mat-chip-listbox> </mat-chip-listbox>
} @else { } @else {
<div>-</div> <div></div>
} }
} @else { } @else {
<mat-form-field appearance="outline" class="w-100 without-hint"> <mat-form-field appearance="outline" class="w-100 without-hint">

Loading…
Cancel
Save