Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Fix preselection when OptionsModel loaded after bound model #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ angular.module('am.multiselect', [])
return parsedResult.source(originalScope);
}, function (newVal) {
if (angular.isDefined(newVal))
parseModel();
{
parseModel();
//if options model is loaded after the selectedModel need to recheck the options.
markChecked(modelCtrl.$modelValue);
}
}, true);

// watch model change
Expand Down