jqh 5 tahun lalu
induk
melakukan
6e13c64d60
2 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 2 2
      src/Form/Condition.php
  2. 4 0
      src/Grid/Column/Condition.php

+ 2 - 2
src/Form/Condition.php

@@ -96,8 +96,8 @@ class Condition
 
     public function __call($name, $arguments)
     {
-        if (! method_exists($this->form, $name)) {
-            return $this;
+        if ($name == 'if') {
+            return $this->form->if(...$arguments);
         }
 
         return $this->then(function (Form $form) use ($name, &$arguments) {

+ 4 - 0
src/Grid/Column/Condition.php

@@ -122,6 +122,10 @@ class Condition
 
     public function __call($name, $arguments)
     {
+        if ($name == 'if') {
+            return $this->column->if(...$arguments);
+        }
+
         return $this->then(function ($column) use ($name, &$arguments) {
             return $column->$name(...$arguments);
         });