From 05e9ab082d75c555402fe66021ad465b121e28d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robson=20Ten=C3=B3rio?= Date: Sat, 28 Sep 2024 17:14:04 -0300 Subject: [PATCH] Table: add `no-hover` (#652) Disable hover effect on rows. --- src/View/Components/Table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/View/Components/Table.php b/src/View/Components/Table.php index a3b3b439..84f164b0 100644 --- a/src/View/Components/Table.php +++ b/src/View/Components/Table.php @@ -36,6 +36,7 @@ public function __construct( public ?bool $showEmptyText = false, public mixed $emptyText = 'No records found.', public string $containerClass = 'overflow-x-auto', + public ?bool $noHover = false, // Slots public mixed $actions = null, @@ -299,7 +300,7 @@ class="@if($isSortable($header)) cursor-pointer hover:bg-base-200 @endif {{ $hea @foreach($rows as $k => $row) !$noHover]) @if($attributes->has('@row-click')) @click="$dispatch('row-click', {{ json_encode($row) }});" @endif