Table columns
hi every one i would like to make my table to be grid for small devices and use the normal table when the screen is big is there any way i can achieve this using filament i need help please
Solution:Jump to solution
I figured out a laravel package called Agent https://github.com/jenssegers/agent
GitHub
GitHub - jenssegers/agent: 👮 A PHP desktop/mobile user agent parser...
👮 A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect - jenssegers/agent
14 Replies
You might get what you want with some CSS, but probably requires a lot of changes.
Is grid required? Maybe you could show/hide columns based on the breakpoints?
https://filamentphp.com/docs/3.x/tables/layout#the-problem-with-traditional-table-layouts
i have tried this approach and it really works well but when the screen is big table headings are hidden
Yes, that's intentional with Stack/Split
any idea on displaying column headings when screen is bigger🤔
You can't with that, sorry. Not sure whether there is a better solution
only real option is to format the state. for example:
Thanks I appreciate you trying to help
This is cool. but in every row you see Name: label. So, I will just use icons instead thank for the help
understood, you just have to realize that when you use splits and stacks, it is technically not a table anymore so no headers, there's also no way to fake the headers since each 'column' actually contains more that one data attribute, so, there's no way to know which label to use for the headers anyway.
Yeah, I see it.
Solution
I figured out a laravel package called Agent https://github.com/jenssegers/agent
GitHub
GitHub - jenssegers/agent: 👮 A PHP desktop/mobile user agent parser...
👮 A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect - jenssegers/agent
so this is what I have done