Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

fixing issue while locking elements with bind to single property and async loading #952

Closed
Closed
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
5 changes: 4 additions & 1 deletion src/uiSelectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ uis.controller('uiSelectCtrl',

if (item && !angular.isUndefined(ctrl.lockChoiceExpression)) {
isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); // force the boolean value
item._uiSelectChoiceLocked = isLocked; // store this for later reference
//we need to check if it's an object while doing bind to single property and async loading
if(typeof(item) === 'object') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use angular.isObject(item)

item._uiSelectChoiceLocked = isLocked; // store this for later reference
}
}

return isLocked;
Expand Down