Skip to content

Commit c0b9648

Browse files
committed
Docs
1 parent 83c9ba0 commit c0b9648

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/rows/clickable-rows.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,21 @@ public function redirectToModel(string $name, array $parameters = [], $absolute
5353
```
5454

5555
Now the blank space of the row should have its action, while your links go to their own action.
56+
57+
## Working with `wire:click` on rows
58+
59+
You can add the row-level livewire clicks by utilising the following method.
60+
61+
```php
62+
public function getTableRowWireClick($row): ?string
63+
{
64+
return "doSomething(" . $row->id . ")";
65+
}
66+
67+
public function doSomething()
68+
{
69+
// ...
70+
}
71+
```
72+
73+
Adding a URL (using `getTableRowUrl`) to a row dismisses the option to use `getTableRowWireClick`, you cannot state both, the URL will supersede.

0 commit comments

Comments
 (0)