You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
When using the ui-disable-choice attribute, the plugin will add the _uiSelectChoiceDisabled property directly to the option model to store if the option is disabled or not. So, when two ui-select share the same list of object, options will be disabled in both ui-select. This is not desirable because a different ui-disable-choice attribute might be defined for different ui-select that share the same data.
A hack would be to clone the options object. But is it possible to have a better fix than that?
Is it possible that this attribute be _uiSelectChoiceDisabled-{{UNIQUE ID OF UI-SELECT}}, that would permit to disable the option only in the given ui-select?
For a given Transaction, there is an Account and a Category defined.
Both Account and Category options are issued from the same list. An Account is a Category and vice-versa.
The Categoryui-select-choice tag has the ui-disable-choice attribute set to a function that disables the Category if this Category has the same id property as the Accountid property.
Select "Category 1" as the account
Select "Category 2" as the category
Select "Category 2" as the account
Try to select "Category 1" as the account (doesn't work)
The text was updated successfully, but these errors were encountered:
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.
Closesangular-ui#1200 and angular-ui#1661
Partially supersedes angular-ui#1641
user378230
added a commit
to user378230/ui-select
that referenced
this issue
Jul 9, 2016
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.
Closesangular-ui#1200 and angular-ui#1661
Partially supersedes angular-ui#1641
When using the
ui-disable-choice
attribute, the plugin will add the_uiSelectChoiceDisabled
property directly to the option model to store if the option is disabled or not. So, when twoui-select
share the same list of object, options will be disabled in bothui-select
. This is not desirable because a differentui-disable-choice
attribute might be defined for differentui-select
that share the same data.A hack would be to clone the options object. But is it possible to have a better fix than that?
Is it possible that this attribute be
_uiSelectChoiceDisabled-{{UNIQUE ID OF UI-SELECT}}
, that would permit to disable the option only in the givenui-select
?Check this http://plnkr.co/edit/WD8eEo?p=info
For a given Transaction, there is an Account and a Category defined.
Both Account and Category options are issued from the same list. An Account is a Category and vice-versa.
The Category
ui-select-choice
tag has theui-disable-choice
attribute set to a function that disables the Category if this Category has the sameid
property as the Accountid
property.The text was updated successfully, but these errors were encountered: