Skip to content

Commit

Permalink
Update ActionColumn.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrulhazim authored Nov 25, 2024
1 parent b45f88a commit 9137cb8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/View/ActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

class ActionColumn extends Column
{
protected string $form;
protected string $form = '';

protected string $actionView = '';

public function form(string $form): self
{
Expand All @@ -16,16 +18,16 @@ public function form(string $form): self
return $this;
}

public function setView($view): self
public function setView($actionView): self
{
$this->view = $view;
$this->actionView = $actionView;

return $this;
}

public function getView(): string
{
return property_exists($this, 'view') ? $this->view : 'livewire.datatable-actions';
return ! empty($this->actionView) ? $this->actionView : 'livewire.datatable-actions';
}

public function getContents(Model $row): null|string|\Illuminate\Support\HtmlString|\Rappasoft\LaravelLivewireTables\Exceptions\DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
Expand Down

0 comments on commit 9137cb8

Please sign in to comment.