Skip to content

Commit

Permalink
Fix hide bulk actions when empty not reflecting in frontend (#1747)
Browse files Browse the repository at this point in the history
* Fix issue with Hide Bulk Actions When Empty not reflecting in frontend

* Fix styling

* Add development branch into tests

---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Jun 29, 2024
1 parent f5dba56 commit 52ad60b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/run-tests-pcov-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- 'develop'
- 'development'
- 'master'

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- 'develop'
- 'development'
- 'master'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion resources/js/laravel-livewire-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ document.addEventListener('alpine:init', () => {
paginationTotalItemCount: wire.entangle('paginationTotalItemCount'),
paginationCurrentItems: wire.entangle('paginationCurrentItems'),
selectedItems: wire.entangle('selected'),
alwaysShowBulkActions: !wire.entangle('hideBulkActionsWhenEmpty'),
hideBulkActionsWhenEmpty: wire.entangle('hideBulkActionsWhenEmpty'),
toggleSelectAll() {
if (!showBulkActionsAlpine) {
return;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/laravel-livewire-tables.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@aware(['component', 'tableName'])
<div
x-data="{ open: false, childElementOpen: false, isTailwind: @js($component->isTailwind()), isBootstrap: @js($component->isBootstrap()) }"
x-cloak x-show="(selectedItems.length > 0 || alwaysShowBulkActions)"
x-cloak x-show="(selectedItems.length > 0 || hideBulkActionsWhenEmpty == false)"
@class([
'mb-3 mb-md-0' => $component->isBootstrap(),
'w-full md:w-auto mb-4 md:mb-0' => $component->isTailwind(),
Expand Down

0 comments on commit 52ad60b

Please sign in to comment.