Skip to content

Commit

Permalink
Merge pull request #15211 from maruthumj/autocomplete-readonly
Browse files Browse the repository at this point in the history
Bug #15188 - Autocomplete: multiple and readonly still show button to remove options
  • Loading branch information
cetincakiroglu authored Apr 9, 2024
2 parents 6158353 + 9302301 commit 822108e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const AUTOCOMPLETE_VALUE_ACCESSOR: any = {
>
<ng-container *ngTemplateOutlet="selectedItemTemplate; context: { $implicit: option }"></ng-container>
<span *ngIf="!selectedItemTemplate" class="p-autocomplete-token-label">{{ getOptionLabel(option) }}</span>
<span class="p-autocomplete-token-icon" (click)="removeOption($event, i)">
<span class="p-autocomplete-token-icon" (click)="!readonly ? removeOption($event, i) : ''">
<TimesCircleIcon [styleClass]="'p-autocomplete-token-icon'" *ngIf="!removeIconTemplate" [attr.aria-hidden]="true" />
<span *ngIf="removeIconTemplate" class="p-autocomplete-token-icon" [attr.aria-hidden]="true">
<ng-template *ngTemplateOutlet="removeIconTemplate"></ng-template>
Expand Down

0 comments on commit 822108e

Please sign in to comment.