diff --git a/resources/views/layouts/table.blade.php b/resources/views/layouts/table.blade.php index f7df4bd58..7557dfc68 100644 --- a/resources/views/layouts/table.blade.php +++ b/resources/views/layouts/table.blade.php @@ -35,7 +35,7 @@ @foreach($rows as $source) - + @foreach($columns as $column) {!! $column->buildTd($source, $loop->parent) !!} @endforeach diff --git a/src/Screen/Action.php b/src/Screen/Action.php index 320253b2f..bf92dac61 100644 --- a/src/Screen/Action.php +++ b/src/Screen/Action.php @@ -84,4 +84,21 @@ protected function getId(): ?string { return $this->get('id'); } + + /** + * Adds the 'stretched-link' class to the element, making its parent block clickable. + * + * The `stretched` method appends the 'stretched-link' class to the element's 'class' attribute, + * allowing the entire parent block of the element to become clickable. + * + * Notes: The parent block must have `position: relative`. + * + * @return self + */ + public function stretched(): self + { + $this->attributes['class'] .= ' stretched-link'; + + return $this; + } }