-
Notifications
You must be signed in to change notification settings - Fork 767
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
Fix/unify options merging #63
Conversation
… on initial/update fromJS and toJS functional. 1) Options for root mapping are merged in priority: current (higher), previous, default (never overwritten) options. 2) Options for nested mapping are not mergeable (cannot merge current options for root with nested) that why we use always previous.
Excellent work. Let me review the patch and I'll try to merge it asap. |
Good! |
Will you also be fixing the failing test (thanks for that too!) or should I handle it? Either is fine, I just want to know what your intentions are. |
Yes, will fix in one hour. |
Do we need really export it?
Do we need export visitModel? The same also for getType that not related to ko.mapping stuff at all. |
I don't think anyone will miss I do want to export |
It's enough for the request and I'm waiting for merging... |
Hmm, I'm seeing some issues. Occasionally the mapping options object itself (e.g. everything in @DzenisevichK do you know what could be causing this behavior? It has to do with converting to JSON and then using that as a source to map again, I think. |
May you create a unit test on jsfiddle to reproduce this? |
Yes, I'll try to do that. |
I have added a failing test. Basically, when using the Maybe it's not as clean when an |
Yes, this is not logically to use options for root object in nested! Problem not in the pull request but in the options' notation at all. We need to create a new issue for discussion options' notation. |
@DzenisevichK Can you also take a look at issue #67? |
Roy, please look on changes in my fork... |
Excellent work! It'll take some time for me to review everything, but it seems very nice. |
|
Sounds very interesting. I'm very pleased with the way you are reducing the code complexity, by the way! |
Fix for #39, #61, #62 issues