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

fix(multiple): setViewValue compatible with 1.3-rc.1+ #193

Merged
merged 1 commit into from
Oct 6, 2014

Conversation

dimirc
Copy link
Contributor

@dimirc dimirc commented Sep 15, 2014

Demo plunker

Closes #191
Closes #176

@LeleDev
Copy link

LeleDev commented Sep 21, 2014

Seems OK for me

@dimirc dimirc force-pushed the fix-multiple-setviewvalue branch from e56789e to 920b2b6 Compare October 6, 2014 23:12
@dimirc
Copy link
Contributor Author

dimirc commented Oct 6, 2014

@dimirc Thanks for helping solve this.

While that solution in #193 will fix the primary issue, it has a side effect where it will run all the setViewValue code paths twice including parsing, validation, and calling any ng-change listeners with an empty string before calling w/ the correct value.

While thats not necessarily a terrible thing, it feels a bit like a hack solution to me. I'll try to get a PR going when I get a bit of spare time! :)

@mpolichette I'm trying a different approach to avoid calling twice setViewValue and yet parse model correctly

@dimirc dimirc added this to the 0.9.x milestone Oct 6, 2014
dimirc added a commit that referenced this pull request Oct 6, 2014
fix(multiple): setViewValue compatible with 1.3-rc.1+
@dimirc dimirc merged commit f28934b into master Oct 6, 2014
@dimirc dimirc deleted the fix-multiple-setviewvalue branch October 6, 2014 23:53
@zyadsherif
Copy link

Thanks for the solution the model is now updating yet I needed to hook on the ng-change directive for the model and now it fires twice, first with an empty model then with the correct changed value.

Any ideas how to solve this issue?

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.

Multiselect broken with Angular 1.3-rc.1 Multiselect: avoid $setViewValue 3rd parameter
3 participants