From c6d3398d55c773402697aac34967fcb33da6391d Mon Sep 17 00:00:00 2001 From: Sutat Meesiri Date: Fri, 12 Mar 2021 13:50:59 +0700 Subject: [PATCH 1/2] Support arbitrary depth of dependsOn fields --- modules/backend/widgets/form/assets/js/winter.form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/backend/widgets/form/assets/js/winter.form.js b/modules/backend/widgets/form/assets/js/winter.form.js index 71a625354d..821cac04e8 100644 --- a/modules/backend/widgets/form/assets/js/winter.form.js +++ b/modules/backend/widgets/form/assets/js/winter.form.js @@ -154,6 +154,7 @@ data: refreshData }).success(function() { self.toggleEmptyTabs() + $('[data-field-name="' + toRefresh.fields[0] + '"]').trigger('change') }) }, this.dependantUpdateInterval) From 7a3148e43b8dc5cfcee2fffd35f4a059aac0bd17 Mon Sep 17 00:00:00 2001 From: Sutat Meesiri Date: Wed, 7 Apr 2021 23:36:55 +0700 Subject: [PATCH 2/2] Support arbitrary depth of dependsOn fields (One to Many) --- modules/backend/widgets/form/assets/js/winter.form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/backend/widgets/form/assets/js/winter.form.js b/modules/backend/widgets/form/assets/js/winter.form.js index af5a58859c..e85474603c 100644 --- a/modules/backend/widgets/form/assets/js/winter.form.js +++ b/modules/backend/widgets/form/assets/js/winter.form.js @@ -186,7 +186,9 @@ data: refreshData }).success(function() { self.toggleEmptyTabs() - $('[data-field-name="' + toRefresh.fields[0] + '"]').trigger('change') + $.each(toRefresh.fields, function(key, field) { + $('[data-field-name="' + field + '"]').trigger('change') + }) }) }, this.dependantUpdateInterval)