Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for AlpineJS - Select All & Deselect All (#1209) #1211

Merged
merged 1 commit into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions resources/views/components/table/tr/bulk-actions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class="bg-indigo-50 dark:bg-gray-900 dark:text-white"
</span>

<button
wire:click="clearSelected"
x-on:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
Expand Down Expand Up @@ -55,7 +55,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
</button>&nbsp;

<button
wire:click="setAllSelected"
x-on:click="setAllSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
Expand All @@ -64,7 +64,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
</button>

<button
wire:click="clearSelected"
x-on:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium focus:outline-none focus:text-gray-800 focus:underline transition duration-150 ease-in-out dark:text-white dark:hover:text-gray-400"
Expand All @@ -90,7 +90,7 @@ class="ml-1 text-blue-600 underline text-gray-700 text-sm leading-5 font-medium
</span>

<button
wire:click="clearSelected"
x-on:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
Expand All @@ -109,7 +109,7 @@ class="btn btn-primary btn-sm"
</span>

<button
x-on:click="selectAllOnPage()"
x-on:click="selectAllOnPage"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
Expand All @@ -118,7 +118,7 @@ class="btn btn-primary btn-sm"
</button>&nbsp;

<button
wire:click="setAllSelected"
x-on:click="setAllSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
Expand All @@ -127,7 +127,7 @@ class="btn btn-primary btn-sm"
</button>

<button
wire:click="clearSelected"
x-on:click="clearSelected"
wire:loading.attr="disabled"
type="button"
class="btn btn-primary btn-sm"
Expand Down
6 changes: 6 additions & 0 deletions resources/views/components/wrapper.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
selectedCount: 0,
visibleItems: {},
allItemsSelected: false,
setAllSelected() {
$wire.setAllSelected();
},
clearSelected() {
$wire.clearSelected();
},
selectAllOnPage() {
let tempSelectedItems = this.selectedItems;
const iterator = visibleItems.values();
Expand Down