Преглед изворни кода

修复模型树RowAction异步处理接口时获取主键报错问题

jqh пре 4 година
родитељ
комит
97de68519d
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/Tree/RowAction.php

+ 4 - 0
src/Tree/RowAction.php

@@ -26,6 +26,10 @@ class RowAction extends Action
      */
     public function getKey()
     {
+        if ($key = parent::getKey()) {
+            return $key;
+        }
+
         return $this->row->{$this->actions->parent()->getKeyName()};
     }