- Creating Columns
- Relationships
- Available Methods
- Other Column Types
- Column Selection
- Secondary Header
- Footer
- Reusable Columns
- Anonymous Columns
- Styling
- Standard Column
- Array Columns (beta)
- Avg Columns (beta)
- Boolean Columns
- Button Group Columns
- Color Columns
- Component Columns
- Count Columns (beta)
- Date Columns
- Icon Columns (beta)
- Image Columns
- Link Columns
- Livewire Component (beta)
- Sum Columns (beta)
- View Component Columns
- Wire Link Column (beta)
- Introduction
- Boolean Filters (beta)
- Date Filters
- DateRange Filters
- DateTime Filters
- Multi-Select Dropdown Filters
- Multi-Select Filters
- NumberRange Filters
- Number Filters
- Select Filters
- Text Filters
- Livewire Custom Filter (Beta)
- Refreshing
- Loading Placeholder
- Multiple Tables Same Page
- Actions (beta)
- Adding Custom Markup
- Debugging
- Saving Table State
- Lifecycle Hooks
- Hiding The Table (beta)
- One Of Many Example
- Tools
Getting Started
Usage
DataTable
Columns
Column Types
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 reordering.
setReorderStatus
Disabled by default, enable/disable reordering for the component.
1public function configure(): void2{3 $this->setReorderStatus(true);4 $this->setReorderStatus(false);5}
setReorderEnabled
Enable reordering on the component.
1public function configure(): void2{3 // Shorthand for $this->setReorderStatus(true);4 $this->setReorderEnabled();5}
setReorderDisabled
Disable reordering on the component.
1public function configure(): void2{3 // Shorthand for $this->setReorderStatus(false);4 $this->setReorderDisabled();5}
setCurrentlyReorderingStatus
Disabled by default, start/stop reordering for the component.
1public function configure(): void2{3 $this->setCurrentlyReorderingStatus(true);4 $this->setCurrentlyReorderingStatus(false);5}
setCurrentlyReorderingEnabled
Start reordering for the component. (Handled by the reorder button, but if you wanted to start reordering without the button, you can call this method.)
1public function configure(): void2{3 // Shorthand for $this->setCurrentlyReorderingStatus(true);4 $this->setCurrentlyReorderingEnabled();5}
setCurrentlyReorderingDisabled
Stop reordering for the component. (Handled by the reorder button, but if you wanted to stop reordering without the button, you can call this method.)
1public function configure(): void2{3 // Shorthand for $this->setCurrentlyReorderingStatus(false);4 $this->setCurrentlyReorderingDisabled();5}
setHideReorderColumnUnlessReorderingStatus
Disabled by default. If your reorder column is part of your table definition, then show/hide it.
1public function configure(): void2{3 $this->setHideReorderColumnUnlessReorderingStatus(true);4 $this->setHideReorderColumnUnlessReorderingStatus(false);5}
setHideReorderColumnUnlessReorderingEnabled
Hide the reorder column from the table unless reordering.
1public function configure(): void2{3 // Shorthand for $this->setHideReorderColumnUnlessReorderingStatus(true);4 $this->setHideReorderColumnUnlessReorderingEnabled();5}
setHideReorderColumnUnlessReorderingDisabled
Don't hide the reorder column from the table.
1public function configure(): void2{3 // Shorthand for $this->setHideReorderColumnUnlessReorderingStatus(false);4 $this->setHideReorderColumnUnlessReorderingDisabled();5}
setReorderMethod
Set the method that will be called when the "Save" button is clicked. (Default is reorder
.)
1public function configure(): void2{3 $this->setReorderMethod('changeOrder');4}
setDefaultReorderSort
Set the default sort the table will use when reordering. (Default is sort
and asc
.)
1public function configure(): void2{3 $this->setDefaultReorderSort('order', 'desc');4}
setReorderThAttributes
You may pass an array to this method, which allows you to pass Custom Attributes into the table header for the Reorder Column
1public function configure(): void2{3 4 $this->setReorderThAttributes([5 'class' => 'bg-red-500',6 'default' => false7 ]);8}