From e70e7c092c9554cf6b84d57f3fca49811b638fe0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 1 Aug 2017 18:14:45 +0200 Subject: [PATCH] Fix ActionColumn route parameters handling --- Datatable/Column/ActionColumn.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Datatable/Column/ActionColumn.php b/Datatable/Column/ActionColumn.php index 781fc32d..7e720ea0 100644 --- a/Datatable/Column/ActionColumn.php +++ b/Datatable/Column/ActionColumn.php @@ -90,7 +90,14 @@ public function renderSingleField(array &$row) if (isset($row[$value])) { $parameters[$actionKey][$key] = $row[$value]; } else { - $parameters[$actionKey][$key] = $value; + $path = Helper::getDataPropertyPath($value); + $entry = $this->accessor->getValue($row, $path); + + if (!empty($entry)) { + $parameters[$actionKey][$key] = $entry; + } else { + $parameters[$actionKey][$key] = $value; + } } } } elseif ($routeParameters instanceof Closure) {