We had to revert to the old Polaris components due to the changed behavior for which we received feedback from customers that they did not like this change.
So what is happening. We replaced our existing tables with <s-table> and we set the variant option to table <s-table variant=”table”>.
According to the documentation:
Sets the layout of the Table.
Options:
- List: The Table is always displayed as a list.
- Table: The Table is always displayed as a table.
- Auto (default): The Table is displayed as a table on wide devices and as a list on narrow devices.
Now all the way at the bottom theres a section “Best practices” which state: “Tables automatically transform into lists on mobile devices”
This is confusing as it is a best practices but Polaris actually enforces this. Even though I set the variant to table, it still reverts to a list view on mobile devices.
In my opinion, we should have control and follow the best practices when applicable. I now have tables that are not suited for a list view. The customer wants to horizontally scroll through the table instead of vertically, as the table now takes up 10 times more space.
It would be great if there is an option to disable the mobile view from being enforced and have the developer decide which variant is most suitable.
See image video example, the list view looks terrible.
https://github.com/user-attachments/assets/a6dfadc5-9b0c-4394-8ff7-1ee59cb3d5af
