Skip to content

Commit

Permalink
Disable rowLink/rowModal/rowSlideover for specific columns
Browse files Browse the repository at this point in the history
  • Loading branch information
J87NL committed Jun 21, 2023
1 parent 32a778e commit 6450539
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Table/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function __construct(
public array|string|null $classes = null,
public Closure|null $as = null,
public string $alignment = 'left',
public bool $clickable = true,
) {
if (is_array($classes)) {
$classes = Arr::flatten($classes);
Expand Down Expand Up @@ -57,6 +58,7 @@ public function clone(): static
$this->classes,
$this->as,
$this->alignment,
$this->clickable,
);
}

Expand All @@ -76,6 +78,7 @@ public function toArray()
'sorted' => $this->sorted,
'highlight' => $this->highlight,
'alignment' => $this->alignment,
'clickable' => $this->clickable,
];
}

Expand Down
2 changes: 2 additions & 0 deletions src/Table/HasColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function column(
array|string|null $classes = null,
callable|null $as = null,
string $alignment = 'left',
bool $clickable = true,
): self {
$key = $key !== null ? $key : Str::kebab($label);
$label = $label !== null ? $label : Str::headline(str_replace('.', ' ', $key));
Expand Down Expand Up @@ -86,6 +87,7 @@ public function column(
classes: $classes,
as: $as,
alignment: $alignment,
clickable: $clickable,
))->values();

if (!$searchable) {
Expand Down

0 comments on commit 6450539

Please sign in to comment.