瀏覽代碼

修正列操作getKey

lila 4 年之前
父節點
當前提交
7352225f04
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Grid/RowAction.php

+ 1 - 1
src/Grid/RowAction.php

@@ -24,7 +24,7 @@ abstract class RowAction extends GridAction
     public function getKey()
     {
         if ($this->row) {
-            return $this->row->get($this->parent->getKeyName());
+            return $this->row->{$this->parent->getKeyName()};
         }
 
         return parent::getKey();