-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use same input-model to multiple multiselectors? #560
Comments
I'm having exactly the same problem on exactly the same day I'm generating the isteven-multi-select inside an ng-repeat and I can't get them to separate. I've tried using a different output-model but that doesn't help |
Hi peeps, That's the default behavior of Javascript: object is, by default, copied by reference (not deep copy). So any changes in one will affect all. If you need it, you need to deep-copy the object you want manually before passing it into the directive. |
@isteven I had seen your comments from the other issues that mention this behaviour and it's solved using your previous suggestion of using angular.copy Thank you, |
@sterichards Yea, that's one workaround I had to do to complete functionality. HTML- JS- |
I am trying to use same input-model for multiple isteven-multi-select inside ng-repeat. But challenge I face is it binds to same input, so selecting any option from one dropdown selects that option in all isteven-multi-select
<div ng-repeat="d in dataList">
<div isteven-multi-select input-model="d.entities" output-model="d.selectedEntities" button-label="entityName" item-label="entityDisplayName" tick-property="ticked" max-labels="1">
</div>
</div>
The text was updated successfully, but these errors were encountered: