1
0
Fork 0

app/Http/Livewire/Datatable.php: Adding toggleTrashed()

This commit is contained in:
Henrik Hautakoski 2022-01-23 12:50:56 +01:00
parent c0e0357a43
commit 34fb4034bb

View file

@ -110,6 +110,12 @@ class Datatable extends Component
return view('livewire.datatable', ['items' => $items]); return view('livewire.datatable', ['items' => $items]);
} }
public function toggleTrashed()
{
$this->trashed = !$this->trashed;
$this->setTrashedColumns();
}
private function setTrashedColumns() private function setTrashedColumns()
{ {
if ($this->trashed) { if ($this->trashed) {