knockout.mapping
knockout.mapping copied to clipboard
'Include' option is not working properly
After doing:
var mapping = {
'include': ['someField1', 'someField2']
}
ko.mapping.fromJS(newData, mapping, myViewModel);
myViewModel contains all fields from newData object, not only 'someField1' and 'someField2'. Other mapping options (ignore, copy, observe) works OK.
I have the exact same problem!
@aupp @GChernikov Although this issue is quite old I'm willing to fix it if still around. If possible please provide a jsfiddle or a test. I tried with the version in my fork and didn't encounter any issues with this option.