diff --git a/source/components/datatable/save-button.mjs b/source/components/datatable/save-button.mjs index ca31f3967f6ca589429ecea20bacb2a150606522..3d0fa884952c30c889917244bf71969683cab1cf 100644 --- a/source/components/datatable/save-button.mjs +++ b/source/components/datatable/save-button.mjs @@ -205,7 +205,9 @@ class SaveButton extends CustomElement { const result = diff(self[originValuesSymbol], currentValues); if (self.getOption("logLevel") === "debug") { console.groupCollapsed("SaveButton"); - console.log(result); + console.log("originValues", JSON.parse(JSON.stringify(currentValues))); + console.log("result of diff", result); + console.log("ignoreChanges", ignoreChanges); if (isArray(result) && result.length > 0) { const formattedDiff = result.map((change) => ({ @@ -229,7 +231,13 @@ class SaveButton extends CustomElement { for (const item of result) { for (const ignorePattern of ignoreChanges) { const p = new RegExp(ignorePattern); - if (p.test(item.path)) { + + let matchPath = item.path + if(isArray(item.path)){ + matchPath = item.path.join("."); + } + + if (p.test(matchPath)) { itemsToRemove.push(item); break; }