From a58dea7d69a8be75079cca4fd3f449bf76641c0b Mon Sep 17 00:00:00 2001 From: Junya Namai Date: Mon, 11 Mar 2024 11:32:04 +0900 Subject: [PATCH 1/2] event.value is not evaluated when the value is array --- src/Form/Field/CanCascadeFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Field/CanCascadeFields.php b/src/Form/Field/CanCascadeFields.php index b4d3deecbb..64f9d98f0e 100644 --- a/src/Form/Field/CanCascadeFields.php +++ b/src/Form/Field/CanCascadeFields.php @@ -214,7 +214,7 @@ protected function addCascadeScript() cascade_groups.forEach(function (event) { var default_value = '{$this->getValueByJs()}' + ''; var class_name = event.class; - if(default_value == event.value) { + f( operator_table[event.operator](default_value, event.value) ) { $('.'+class_name+'').removeClass('hide'); } }); From 716cac17f18e6be02cb5583d67713a9e2cb7cbab Mon Sep 17 00:00:00 2001 From: Junya Namai Date: Mon, 11 Mar 2024 11:39:47 +0900 Subject: [PATCH 2/2] bugfix --- src/Form/Field/CanCascadeFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Field/CanCascadeFields.php b/src/Form/Field/CanCascadeFields.php index 64f9d98f0e..46924c3d65 100644 --- a/src/Form/Field/CanCascadeFields.php +++ b/src/Form/Field/CanCascadeFields.php @@ -214,7 +214,7 @@ protected function addCascadeScript() cascade_groups.forEach(function (event) { var default_value = '{$this->getValueByJs()}' + ''; var class_name = event.class; - f( operator_table[event.operator](default_value, event.value) ) { + if( operator_table[event.operator](default_value, event.value) ) { $('.'+class_name+'').removeClass('hide'); } });