How to load different table columns based on screen size?

Hi all,

I'm trying to create a table where the number or type of columns adjusts automatically based on the screen size. Is there a way to detect the screen size when the Livewire component loads, and then conditionally call either function1() or function2() inside the ->columns() definition of the table?

In short: I want to load different sets of columns (normal or stacked) depending on whether the user is on a small or large screen. What would be the best approach to achieve this? I am not using panels.

Thanks in advance!
Was this page helpful?