Skip to content

Commit d55e91b

Browse files
committed
Docs update
1 parent 530e3e0 commit d55e91b

File tree

14 files changed

+60
-13
lines changed

14 files changed

+60
-13
lines changed

docs/bulk-actions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Bulk Actions
3-
weight: 8
3+
weight: 9
44
---

docs/columns/available-methods.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,15 @@ If you don't want a column to be able to be turned off from the column select bo
226226
```php
227227
Column::make('Address', 'address.address')
228228
->excludeFromColumnSelect()
229-
```
229+
```
230+
231+
### Preventing clicks if row URL is enabled
232+
233+
If you have row URLs enabled, but you have a specific column you do not want clickable, i.e. in the event there is something else clickable in that row, you may yse the following:
234+
235+
```php
236+
Column::make('Name')
237+
->unclickable(),
238+
```
239+
240+
See more in the [clickable rows documentation](../rows/clickable-rows).

docs/examples/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Examples
3-
weight: 13
3+
weight: 14
44
---

docs/filters/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Filters
3-
weight: 9
3+
weight: 10
44
---

docs/footer/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Footer
3-
weight: 12
3+
weight: 13
44
---

docs/misc/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Misc.
3-
weight: 14
3+
weight: 15
44
---

docs/pagination/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Pagination
3-
weight: 6
3+
weight: 7
44
---

docs/reordering/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Reordering
3-
weight: 10
3+
weight: 11
44
---

docs/rows/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Rows
3+
weight: 5
4+
---

docs/rows/clickable-rows.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Clickable Rows
3+
weight: 1
4+
---
5+
6+
To enable clickable rows on your table, you may add the following to the table component configuration:
7+
8+
```php
9+
public function configure(): void
10+
{
11+
$this->setPrimaryKey('id')
12+
->setTableRowUrl(function($row) {
13+
return route('admin.users.show', $row);
14+
})
15+
->setTableRowUrlTarget(function($row) {
16+
if ($row->isExternal()) {
17+
return '_blank';
18+
}
19+
20+
return '_self';
21+
});
22+
}
23+
```
24+
25+
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:
26+
27+
```php
28+
Column::make('Name')
29+
->unclickable(),
30+
```
31+
32+
**Note:** LinkColumns are not clickable by default to preserve the intended behavior of the link.

0 commit comments

Comments
 (0)