Show grid columns depending on browser width

I have one grid with 4 columns, but for smaller devices I want to show only 2 columns. I know about setVisible(false), but I want my grid to work with Lumo BreakPoint properties. How can I bind them together? Or is there another way to run methods depending on page size?

Take a look at this example How do I make a responsive Grid that has a different set of columns depending on the browser width. - Vaadin Cookbook

3 Likes