Skip to content

Commit

Permalink
Fixed #14490
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Jan 10, 2024
1 parent 08b6478 commit 59a3695
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 59a3695

Please sign in to comment.