Browse Source

修复 Radio 和 Checkbox 调用 when 方法功能失效 (#1810)

Tall Libra 2 years ago
parent
commit
7cbf2787de
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Form/Field/CanCascadeFields.php

+ 2 - 2
src/Form/Field/CanCascadeFields.php

@@ -230,11 +230,11 @@ JS;
                 return 'var checked = $(this).val();';
             case Radio::class:
                 return <<<JS
-var checked = \$this.closest('.fields-group').find(':checked').val();
+var checked = \$(this).closest('.form-group').find(':checked').val();
 JS;
             case Checkbox::class:
                 return <<<JS
-var checked = \$this.closest('.fields-group').find(':checked').map(function(){
+var checked = \$this.closest('.form-group').find(':checked').map(function(){
   return $(this).val();
 }).get();
 JS;