diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index 2a10924254f..92cf0ecaa5d 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -1092,11 +1092,11 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft const modelValue = this.modelValue(); const visibleOptions = this.visibleOptions(); - if (visibleOptions && ObjectUtils.isNotEmpty(visibleOptions) && modelValue) { - if (this.optionValue && this.optionLabel) { + if (visibleOptions && ObjectUtils.isNotEmpty(visibleOptions)) { + if (this.optionValue && this.optionLabel && modelValue) { this.selectedOptions = visibleOptions.filter((option) => modelValue.includes(option[this.optionLabel]) || modelValue.includes(option[this.optionValue])); } else { - this.selectedOptions = [...modelValue]; + this.selectedOptions = modelValue; } this.cd.markForCheck(); }