Skip to content

Commit 2651b94

Browse files
committed
Add wireclick to bootstrap 4 and 5 rows blade
1 parent 3836d7f commit 2651b94

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

resources/views/bootstrap-4/components/table/row.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
@endif
88

99
<tr
10-
{{ $attributes->merge($customAttributes) }}
10+
{{ $attributes->merge($customAttributes)->merge(['style' => ($url || $wireclick) ? 'cursor: pointer;' : '']) }}
1111

1212
@if ($url)
1313
onclick="window.open('{{ $url }}', '{{ $target }}')"
14-
style="cursor:pointer"
14+
@elseif ($wireclick)
15+
wire:click="{{ $wireclick }}"
1516
@endif
1617
>
1718
{{ $slot }}

resources/views/bootstrap-5/components/table/row.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
@endif
88

99
<tr
10-
{{ $attributes->merge($customAttributes) }}
10+
{{ $attributes->merge($customAttributes)->merge(['style' => ($url || $wireclick) ? 'cursor: pointer;' : '']) }}
1111

1212
@if ($url)
1313
onclick="window.open('{{ $url }}', '{{ $target }}')"
14-
style="cursor:pointer"
14+
@elseif ($wireclick)
15+
wire:click="{{ $wireclick }}"
1516
@endif
1617
>
1718
{{ $slot }}

0 commit comments

Comments
 (0)