From 6e7a6f961755715713256e43a33fb4725625d812 Mon Sep 17 00:00:00 2001 From: Jigal Sanders Date: Sun, 18 Feb 2024 13:44:08 +0100 Subject: [PATCH 1/3] Fix extraItemActions --- resources/views/components/table-repeater.blade.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/resources/views/components/table-repeater.blade.php b/resources/views/components/table-repeater.blade.php index c22c9f4..7e052dd 100644 --- a/resources/views/components/table-repeater.blade.php +++ b/resources/views/components/table-repeater.blade.php @@ -26,13 +26,6 @@ $statePath = $getStatePath(); - foreach ($containers as $uuid => $row) { - $visibleExtraItemActions = array_filter( - $extraItemActions, - fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), - ); - } - foreach ($extraActions as $extraAction) { $visibleExtraActions = array_filter( $extraActions, @@ -107,6 +100,12 @@ class="table-repeater-rows-wrapper divide-y divide-gray-950/5 dark:divide-white/ > @if (count($containers)) @foreach ($containers as $uuid => $row) + @php + $visibleExtraItemActions = array_filter( + $extraItemActions, + fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), + ); + @endphp Date: Sun, 18 Feb 2024 13:46:49 +0100 Subject: [PATCH 2/3] Revert "Fix extraItemActions" This reverts commit 6e7a6f961755715713256e43a33fb4725625d812. --- resources/views/components/table-repeater.blade.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/views/components/table-repeater.blade.php b/resources/views/components/table-repeater.blade.php index 7e052dd..c22c9f4 100644 --- a/resources/views/components/table-repeater.blade.php +++ b/resources/views/components/table-repeater.blade.php @@ -26,6 +26,13 @@ $statePath = $getStatePath(); + foreach ($containers as $uuid => $row) { + $visibleExtraItemActions = array_filter( + $extraItemActions, + fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), + ); + } + foreach ($extraActions as $extraAction) { $visibleExtraActions = array_filter( $extraActions, @@ -100,12 +107,6 @@ class="table-repeater-rows-wrapper divide-y divide-gray-950/5 dark:divide-white/ > @if (count($containers)) @foreach ($containers as $uuid => $row) - @php - $visibleExtraItemActions = array_filter( - $extraItemActions, - fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), - ); - @endphp Date: Sun, 18 Feb 2024 13:47:36 +0100 Subject: [PATCH 3/3] Fix extraItemActions --- resources/views/components/table-repeater.blade.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/resources/views/components/table-repeater.blade.php b/resources/views/components/table-repeater.blade.php index c22c9f4..7e052dd 100644 --- a/resources/views/components/table-repeater.blade.php +++ b/resources/views/components/table-repeater.blade.php @@ -26,13 +26,6 @@ $statePath = $getStatePath(); - foreach ($containers as $uuid => $row) { - $visibleExtraItemActions = array_filter( - $extraItemActions, - fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), - ); - } - foreach ($extraActions as $extraAction) { $visibleExtraActions = array_filter( $extraActions, @@ -107,6 +100,12 @@ class="table-repeater-rows-wrapper divide-y divide-gray-950/5 dark:divide-white/ > @if (count($containers)) @foreach ($containers as $uuid => $row) + @php + $visibleExtraItemActions = array_filter( + $extraItemActions, + fn (Action $action): bool => $action(['item' => $uuid])->isVisible(), + ); + @endphp