Skip to content

Commit

Permalink
Fix: Dropdown respects emitEvent=false when setting value (primefaces…
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszstudentzero committed Nov 22, 2024
1 parent c0f507e commit 421ad63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,13 +1208,15 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
this.selectedOptionUpdated = true;
}

writeValue(value: any): void {
writeValue(value: any, emitEvent: boolean = true): void {
if (this.filter) {
this.resetFilter();
}

this.value = value;
this.allowModelChange() && this.onModelChange(value);
if (emitEvent && this.allowModelChange()) {
this.onModelChange(value);
}
this.modelValue.set(this.value);
this.updateEditableLabel();
this.cd.markForCheck();
Expand Down

0 comments on commit 421ad63

Please sign in to comment.