Filtering widget data with HasFiltersForm on view resource page

I'm trying to use the Filtering widget data with HasFiltersForm on view resource page (Infolist). I currently put the use Filament\Pages\Dashboard\Concerns\HasFiltersForm; trait, and put the filtersForm method:

public function filtersForm(Form $form): Form
    {
        return $form
            ->schema([
                Section::make()
                    ->schema([
                        DatePicker::make('startDate'),
                        DatePicker::make('endDate'),
                        // ...
                    ])
                    ->columns(3),
            ]);
    }


But it doesn't show anything about the filter. How can I make it work in a view resource / Infolist page?
Was this page helpful?