-
Notifications
You must be signed in to change notification settings - Fork 458
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
[question] is it possible to omit certain fields from the diff? #258
Comments
+1 for this feature, it is nice to be able to ignore properties but since they are still displayed it seems as if both left and right objects have the same value which is incorrect. Note: right now I am using lodash omit to exclude those properties but this works out of the box only on top properties so not ideal |
Hi @vlamic, Could you please explain how you have implemented the propertyFilter to exclude certain fields? your help much appreciated? Thanks |
@prasanmgc you just need to do |
Thanks a lot @mebibou. It worked. you saved my time. |
@mebibou Just a quick question. Is it possible to reference the ignored fields from a class variable? I am getting an error when i use the below. TypeError: Cannot read property 'ignoredFields' of undefined |
@prasanmgc I suggest you read first what var ignoredFields = [];
create({
propertyFilter(name: string) { return !ignoredFields.includes(name); }
}); |
@mebibou @prasanmgc property filter doesn't remove the fields from the nested objects, did it work for you for nested objects too? |
First of all - thanks for your library - it rocks! ❤️
I have a question.
I know it's possible to use
propertyFilter
to exclude certain fields from participating in diff. However, these fields are still present in the resulting diff (applies for added elements). Is there an option to also exclude these field for these added elements?Thanks!
The text was updated successfully, but these errors were encountered: