How to Implement Pagination in ViewRecord Page with Custom View?
Hello, I'm trying to add pagination to a custom view in Filament. Here's my current setup:
- File Location:
- Resource: app/Filament/Resources/TrabajoResource/Pages/ViewTrabajo.php
- Custom View: resources/views/filament/resources/trabajo/view.blade.php
- Current Code:
- View Implementation:
- First Attempt (Standard Pagination):
- Using
{{ $evidencias->links() }}works functionally - Issues:
- Design doesn't match Filament's style
- Full page refreshes cause scroll jumps
- Using
- Second Attempt (Filament Pagination Component):
- Using
<x-filament::pagination :paginator="$evidencias" extreme-links />:- Pros: Perfect design match with Filament
- Errors: Throws Livewire errors when clicking:
- Using
- Uses Filament's styled pagination component
- Properly handles page navigation without Livewire errors
- Maintains smooth UX without full page refreshes?
I've checked the Filament Pagination docs but they seem focused on component.
Thank you in advance for your help