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

Conversation

lukasz-karolewski
Copy link

_uiSelectChoiceLocked cannot be assigned to primitive type

…async loading

_uiSelectChoiceLocked cannot be assigned to primitive type
@@ -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)

user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
user378230 added a commit to user378230/ui-select that referenced this pull request Jul 9, 2016
Previously setting a selected item as locked modified that item, this
could cause issues if the item was used outside of the directive.

This commit changes the directive to store the information internally
thus preventing it from interfering with external uses.

Closes angular-ui#1269 and angular-ui#514
Supersedes (and closes) angular-ui#1641 and angular-ui#952
@user378230
Copy link
Contributor

Superseded by #1712

@user378230 user378230 closed this Nov 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants