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

Fix is disabled and prevent modifying items #1712

Merged
merged 3 commits into from
Jul 9, 2016

Conversation

user378230
Copy link
Contributor

Refactors isDisabled and isLocked to no longer rely on modifying the list item with _uiSelectChoiceDisabled and _uiSelectChoiceLocked properties which caused issues when items were used elsewhere (outside of the ui-select directive).

Also, resolves infinite digest loop caused by attempting to add a new tag that included an existing tag, ie:

tag1: "a"
tag2: "aa"

Closes #1200, #1661, #1693, #1269, #514
Closes #1641 and #952 (supersedes)

Previously the item from the list was modified with the
_uiSelectChoiceDisabled property. This allowed a leakage of information
from ui-select to outside the directive. It also caused issues when the
was used outside of the directive.

This commit adds a reference array to store disabled items and so
prevents the need to modify the item in place.

Closes angular-ui#1200 and angular-ui#1661

Partially supersedes angular-ui#1641
Resolves issue where isDisabled was running for tags and causing a
infite loop to occur if the new tag value included a previous value.

For example:
  tag1: "a"
  tag2: "aa"

Fixes angular-ui#1693
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with multiple ui-select and ui-disable-choice
1 participant