Skip to content

Commit b921e4c

Browse files
authored
Merge pull request #15340 from tanthammar/column-click-prevent
Prevent stacked, editable table columns to trigger wrapping a.href
2 parents 4c850f0 + 0e2d848 commit b921e4c

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

packages/tables/resources/views/columns/checkbox-column.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
1616
state: @js($state),
1717
}"
18+
x-on:click.stop.prevent=""
1819
x-init="
1920
() => {
2021
Livewire.hook('commit', ({ component, commit, succeed, fail, respond }) => {

packages/tables/resources/views/columns/select-column.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
theme: $store.theme,
7373
}
7474
"
75-
x-on:click.stop=""
75+
x-on:click.stop.prevent=""
7676
>
7777
<x-filament::input.select
7878
:disabled="$isDisabled"

packages/tables/resources/views/columns/text-input-column.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
theme: $store.theme,
8888
}
8989
"
90-
x-on:click.stop=""
90+
x-on:click.stop.prevent=""
9191
>
9292
{{-- format-ignore-start --}}
9393
<x-filament::input

packages/tables/resources/views/columns/toggle-column.blade.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131
role="switch"
3232
aria-checked="false"
3333
x-bind:aria-checked="state.toString()"
34+
wire:loading.attr="disabled"
3435
@if (! $isDisabled)
35-
x-on:click.stop="
36-
if (isLoading) {
36+
x-on:click.stop.prevent="
37+
if (isLoading || $el.hasAttribute('disabled')) {
3738
return
3839
}
3940

0 commit comments

Comments
 (0)