Skip to content

Commit

Permalink
Merge pull request #14802 from primefaces/issue-14794
Browse files Browse the repository at this point in the history
Fixed #14794 - Listbox | readonly attribute no longer works
  • Loading branch information
cetincakiroglu authored Feb 14, 2024
2 parents 59e0269 + 0b77b0a commit ef7b79f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
}

onOptionSelect(event, option, index = -1) {
if (this.disabled || this.isOptionDisabled(option)) {
if (this.disabled || this.isOptionDisabled(option) || this.readonly) {
return;
}

Expand Down Expand Up @@ -1439,3 +1439,4 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
declarations: [Listbox]
})
export class ListboxModule {}

0 comments on commit ef7b79f

Please sign in to comment.