Create a product grid in filament
I need to build a product grid for a webshop and I'm wondering if it makes sense to use Filament tables for this, because it has all the basic components ready to go:
- table/gridview for products
- filters
- ordering
- pagination
- search
I made a quick component to try it out, but I came across some issues:
- The filters need to go in a sidebar, which is difficult since the table and filters are rendered as one component
- For pagination, I need a button "load more", instead of the regular built in pagination
- The filters and pagination should update the URL, this doesn't seem to work out of the box
So, does it makes sense to use the Table builder for this, or could I use separate components like filters and pagination, or is it better to make everything from scratch?~~
3 Replies
Don’t use filament table for this
Livewire support pagination out of of the box
I agree, it's probably better to make it from scratch. For the "load more", I did a quick prototype sometime last year, maybe it can give you a starting point :
https://github.com/pboivin/livewire-load-more-poc
Thanks, I'll check it out