Pagination not showing in dashboard table widget
Hello All,
On my dashboard I have given a table widget for expiry alert and it is not showing pagination as the default tables. It shows like this...
Thank you.
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1176785235816497202/image.png)
4 Replies
I think by default table widgets use simple pagination. You should be able to configure that.
thanks for your reply @Dennis Koch I think default pagination is this only. But I want it toshow the total results plus the page number. After exploring a bit I got this "use Tables\Concerns\InteractsWithTable;" but when I use this I cannot see the table heading as 'Expiry Alert'.
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1176834646701527050/image.png)
Removing this from TableWidget solves the problem
protected function paginateTableQuery(Builder $query): Paginator
{
return $query->simplePaginate($this->getTableRecordsPerPage() == 'all' ? $query->count() : $this->getTableRecordsPerPage());
}
You can add this in the Widget class
UPDATE: