Documentation version
v4 (master)
v2 (v2-master)
v1 (v1)
Documentation page
Introduction
Support Me
Questions and Issues
Changelog
Upgrade Guide
Requirements
Recommended
Installation
Including Assets
Commands
Configuration
Rendering
Creating Components
The Query
Configuration
Common Issues
Available Methods
Events
Configurable Areas
Loaders
Query String
Styling
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
Increment Column (beta)
Link Columns
Livewire Component (beta)
Sum Columns (beta)
View Component Columns
Wire Link Column (beta)
Clickable Rows
Available Methods
Available Methods
Available Methods
Introduction
Creating Bulk Actions
Processing Bulk Actions
Available Methods
Styling
Introduction
Creating Filters
Applying Filters
Available Methods
Available Component Methods
Available Filter Methods
Filter Pills
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)
Livewire Custom Array Filter (Beta)
Introduction
Setup
Saving
Available Methods
Available Methods
Styling
Available Methods
Styling
Basic Example
Advanced Example
Bulk Action Export
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
Sponsor: Introduction
Sponsor: Best Practices
Sponsor: Troubleshooting
Sponsor: Accessibility
Re-using attributes across tables
Performance Optimization
Advanced Filtering
Bulk Actions
Complex Relationships
Custom Column Types
Testing Table Components
Package Integrations
Theming and Customization
Real-Time Updates
Multi-Tenancy Patterns
Advanced Query Patterns
Basic Modal Example
Clicking a row to edit in a modal
Export Functionality
Real-World Example: E-Commerce Orders Table
Admin Dashboard Table
On this page
Using wire:navigate
You are reading documentation for v4 .
Switch versions from the documentation menu. Check the installed version with:
composer show rappasoft/laravel-livewire-tables
To enable clickable rows on your table, you may add the following to the table component configuration:
1 public function configure (): void
2 {
3 $this-> setPrimaryKey ( ' id ' )
4 -> setTableRowUrl ( function ($ row ) {
5 return route ( ' admin.users.show ' , $ row );
6 })
7 -> setTableRowUrlTarget ( function ($ row ) {
8 if ($ row -> isExternal ()) {
9 return ' _blank ' ;
10 }
11
12 return ' _self ' ;
13 });
14 }
If you would like to make a certain cell unclickable (i.e. if you have something else clickable in that cell), you may do so by adding the following to the column configuration:
1 Column :: make ( ' Name ' )
2 -> unclickable (),
Note: LinkColumns are not clickable by default to preserve the intended behavior of the link.
# Using wire:navigate
To use wire:navigate, you should return "navigate" as the target for setTableRowUrlTarget
1 public function configure (): void
2 {
3 $this-> setPrimaryKey ( ' id ' )
4 -> setTableRowUrl ( function ($ row ) {
5 return route ( ' admin.users.show ' , $ row );
6 })
7 -> setTableRowUrlTarget ( function ($ row ) {
8 if ($ row -> isExternal ()) {
9 return ' _blank ' ;
10 }
11
12 return ' navigate ' ;
13 });
14 }