- Creating Columns
- Relationships
- Available Methods
- Other Column Types
- Column Selection
- Secondary Header
- Footer
- Reusable Columns
- Anonymous Columns
- Introduction
- Date Filters
- DateRange Filters
- DateTime Filters
- Multi-Select Dropdown Filters
- Multi-Select Filters
- NumberRange Filters
- Number Filters
- Select Filters
- Text Filters
- Refreshing
- Loading Placeholder
- Multiple Tables Same Page
- Adding Custom Markup
- Debugging
- Saving Table State
- Lifecycle Hooks
Getting Started
Usage
DataTable
Columns
Rows
Sorting
Pagination
Search
Bulk Actions
Filters
Filter Types
Reordering
Secondary Header
Footer
Examples
Misc.
Sponsored
Advanced Usage
Examples
🎉 Enjoying this package? Consider sponsoring me on GitHub or buying me a beer.
This is the documentation for v3. You can switch versions in the menu on the left/at the top. Check your current version with the following command:
composer show rappasoft/laravel-livewire-tables
Available Methods
These are the available configuration methods for bulk actions.
setBulkActions
Set the bulk actions array.
1public function configure(): void2{3 $this->setBulkActions([4 'exportSelected' => 'Export',5 ]);6}
setBulkActionsStatus
Enabled by default, enable/disable bulk actions for the component.
1public function configure(): void2{3 $this->setBulkActionsStatus(true);4 $this->setBulkActionsStatus(false);5}
setBulkActionsEnabled
Enable bulk actions on the component.
1public function configure(): void2{3 // Shorthand for $this->setBulkActionsStatus(true)4 $this->setBulkActionsEnabled();5}
setBulkActionsDisabled
Disable bulk actions on the component.
1public function configure(): void2{3 // Shorthand for $this->setBulkActionsStatus(false)4 $this->setBulkActionsDisabled();5}
setSelectAllStatus
Disabled by default, enable/disable pre-selection of all bulk action check boxes.
1public function configure(): void2{3 $this->setSelectAllStatus(true);4 $this->setSelectAllStatus(false);5}
setSelectAllEnabled
Check all bulk action checkboxes.
1public function configure(): void2{3 // Shorthand for $this->setSelectAllStatus(true)4 $this->setSelectAllEnabled();5}
setSelectAllDisabled
Deselect the select-all bulk actions checkbox.
1public function configure(): void2{3 // Shorthand for $this->setSelectAllStatus(false)4 $this->setSelectAllDisabled();5}
setHideBulkActionsWhenEmptyStatus
Disabled by default, enable/disable hiding of bulk actions dropdown when empty.
1public function configure(): void2{3 $this->setHideBulkActionsWhenEmptyStatus(true);4 $this->setHideBulkActionsWhenEmptyStatus(false);5}
setHideBulkActionsWhenEmptyEnabled
Hide bulk actions dropdown when empty.
1public function configure(): void2{3 // Shorthand for $this->setHideBulkActionsWhenEmptyStatus(true)4 $this->setHideBulkActionsWhenEmptyEnabled();5}
setHideBulkActionsWhenEmptyDisabled
Show bulk actions dropdown when empty.
1public function configure(): void2{3 // Shorthand for $this->setHideBulkActionsWhenEmptyStatus(false)4 $this->setHideBulkActionsWhenEmptyDisabled();5}
setBulkActionConfirms
When a bulk action is included in the array passed to setBulkActionConfirms, the default wire:confirm pop-up will appear prior to executing the bulk action. The default message is: "Are you sure?". This should only be used if you wish to use the default message.
1public function configure(): void2{3 $this->setBulkActionConfirms([4 'delete',5 'reset'6 ]);7}
setBulkActionDefaultConfirmationMessage
You may use this method to over-ride the default message. To override the confirmation message for an individual Bulk Action, see the below setBulkActionConfirmMessage and setBulkActionConfirmMessages. You may also use the language files to do this.
1public function configure(): void2{3 $this->setBulkActionDefaultConfirmationMessage('Are you certain?');4}
setBulkActionConfirmMessage
You may use this method to specify a message other than the default message.
1public function configure(): void2{3 $this->setBulkActionConfirmMessage('delete', 'Do you want to delete these items?');4}
setBulkActionConfirmMessages
You may pass an array to this method, to more effectively update the confirmation message for a larger quantity of bulk actions. This expects an array keyed by the bulk action name, with the value being the message that will be displayed to the user.
1public function configure(): void2{3 $this->setBulkActionConfirmMessages([4 'delete' => 'Are you sure you want to delete these items?',5 'purge' => 'Are you sure you want to purge these items?',6 'reassign' => 'This will reassign selected items, are you sure?',7 ]);8}