From d44b9d252216fb8fb1f917fdda0468713dead306 Mon Sep 17 00:00:00 2001 From: Genki Katsutani Date: Sun, 3 Apr 2022 01:48:04 +0900 Subject: [PATCH 1/2] Fixed issue #1485 I fixed the issue #1485. It appears to be working as expected in my environment. --- modules/Collections/views/entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Collections/views/entry.php b/modules/Collections/views/entry.php index 74f448818..7346d276a 100755 --- a/modules/Collections/views/entry.php +++ b/modules/Collections/views/entry.php @@ -336,7 +336,7 @@ App.ui.notify("Saving successful", "success"); - _.extend($this.entry, entry); + _.extend(entry, $this.entry); $this.fields.forEach(function(field){ From 3803b4835e8b2d0187d20f4ca3699b36b2645010 Mon Sep 17 00:00:00 2001 From: Genki Katsutani Date: Sun, 10 Apr 2022 16:45:51 +0900 Subject: [PATCH 2/2] Fixed an issue with nested fields Fixed an issue where deleting a field in a nested child element and then saving would restore the deleted field. --- modules/Cockpit/assets/components/field-layout.tag | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/Cockpit/assets/components/field-layout.tag b/modules/Cockpit/assets/components/field-layout.tag index 2473cf0df..684596635 100644 --- a/modules/Cockpit/assets/components/field-layout.tag +++ b/modules/Cockpit/assets/components/field-layout.tag @@ -468,8 +468,16 @@ remove(e) { this.items.splice(e.item.idx, 1); + function checkParent(child) { + if(!child.parent){ + child.update(); + }else{ + checkParent(child.parent); + } + } + if (opts.child) { - this.parent.update() + checkParent(this); } }