Pagination Index in Table Widget?

I noticed that my table resource has an index of page numbers (bottom right). While any table widgets I use on regular pages (non-resource) do not. The table-widgets on pages simply have [ < previous ] and [next >] buttons.
Is there anyway to include that fancy numerical pagination index in a table widget?
10 Replies
awcodes
awcodes2y ago
I’m not sure how to do it, but I would highly recommend against it. It’s going to be horrible on smaller screens and smaller widget widths. Probably fine with a small number of pages but imagine if you get to 100s of pages. It wouldn’t fit in the widget.
bionary
bionaryOP2y ago
Everything I'm building is a true admin dash...to be used at full screen computer. I was looking for consistency across the app. The table is full width. too bad. I thought under the hood all of the "admin panel" stuff was using the table classes.
awcodes
awcodes2y ago
I guess you could make your own livewire wiget and just use the table builder in it. Depends on where they are output in the page. If the widgets are inside the page’s form html tag then it won’t work.
bionary
bionaryOP2y ago
I'm loading them via getHeaderWidgets(){}
awcodes
awcodes2y ago
Yea, just don’t remember where that’s loaded. Should be ok though, I think.
bionary
bionaryOP2y ago
or I have a better idea...I'll leave as is and hope the client doesn't even notice!
awcodes
awcodes2y ago
😂 Did they specifically ask for it. If not, don’t bother.
bionary
bionaryOP2y ago
no what I like about the admin table as well, is it displays a showing ### results on the bottom left. but like you said, if I *really wanted to I might be able to attempt with table builder
awcodes
awcodes2y ago
I’m sure there’s a way to use your own pagination view or even change to one of the other defaults. https://laravel-livewire.com/docs/2.x/pagination#custom-pagination-view
Livewire
Pagination | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
bionary
bionaryOP2y ago
I often forget that there is a tight coupling between filament and livewire
Want results from more Discord servers?
Add your server