jqh 5 lat temu
rodzic
commit
c4d4ad3e2e
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 4 4
      src/Actions/Action.php
  2. 1 1
      src/Grid/Tools/AbstractTool.php

+ 4 - 4
src/Actions/Action.php

@@ -53,7 +53,7 @@ abstract class Action implements Renderable
     /**
      * @var bool
      */
-    protected $disabledHandler = false;
+    protected $usingHandler = true;
 
     /**
      * Action constructor.
@@ -178,10 +178,10 @@ abstract class Action implements Renderable
     /**
      * @return void
      */
-    protected function prepareHandle()
+    protected function prepareHandlerScript()
     {
         if (
-            $this->disabledHandler
+            ! $this->usingHandler
             || ! method_exists($this, 'handle')
         ) {
             return;
@@ -199,7 +199,7 @@ abstract class Action implements Renderable
             return '';
         }
 
-        $this->prepareHandle();
+        $this->prepareHandlerScript();
         $this->addScript();
 
         return $this->html();

+ 1 - 1
src/Grid/Tools/AbstractTool.php

@@ -29,7 +29,7 @@ abstract class AbstractTool extends Grid\GridAction
     public function html()
     {
         if ($href = $this->href()) {
-            $this->disabledHandler = true;
+            $this->usingHandler = false;
         }
 
         $this->setHtmlAttribute([