Skip to content

Commit

Permalink
Merge pull request #17179 from mark7p/fix/#17178-select-marked-dirty-…
Browse files Browse the repository at this point in the history
…on-start

Fix: Dropdown/Select(#17178) Marked as dirty on start
  • Loading branch information
cetincakiroglu authored Dec 23, 2024
2 parents 9cd972b + 2c87baf commit 865f4ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primeng/src/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ export class Select extends BaseComponent implements OnInit, AfterViewInit, Afte
}

allowModelChange() {
return this.autoDisplayFirst && !this.placeholder() && (this.modelValue() === undefined || this.modelValue() === null) && !this.editable && this.options && this.options.length;
return !!this.modelValue() && !this.placeholder() && (this.modelValue() === undefined || this.modelValue() === null) && !this.editable && this.options && this.options.length;
}

isSelected(option) {
Expand Down

0 comments on commit 865f4ba

Please sign in to comment.