diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index 3f7c71e..b179fe0 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -44,14 +44,11 @@ protected function getHeaderActions(): array ->label('Reset Filter') ->icon(Heroicon::XMark) ->color('danger') - ->action(fn () => $this->resetFilters()) + ->action(function () { + $this->filters['startDate'] = null; + $this->filters['endDate'] = null; + }) ->visible(fn () => ! empty($this->filters['startDate']) || ! empty($this->filters['endDate'])), ]; } - - public function resetFilters(): void - { - $this->filters['startDate'] = null; - $this->filters['endDate'] = null; - } }