diff
diff copied to clipboard
Incorrectly formed deleted array element
These are two arrays, they differ in the middle element
var o1 = {files: [{pages: [{id: 1, name: 'abc'},{id: 2, name: 'def'},{id: 3, name: 'jhk'}]} ]} var o2 = {files: [{pages: [{id: 1, name: 'abc'},{id: 3, name: 'jhk'}]} ]}
diff Shows the following result:
DiffArray index: 2 item: DiffDeleted {kind: "D", lhs: Object {id: 3, name: "jhk"}} kind: "A" path: ["files", 0, "pages"]"
That is, always the last element
I have encountered the same issue, any changes in array returns the last element as changed.
As a workaround, if the diff array is larger than 1, I'm concatenating the index of the last "edited" element.
Created a stackblitz as example
any progress?
any progress?