DataTable responsive layout can be achieved in two ways: first approach is displaying a horizontal scrollbar for smaller screens, and the second one is defining a breakpoint to display the cells of a row as stacked. Scrollable tables use the scroll layout approach internally and do not require additional configuration.
Scroll Layout
Set responsiveLayout to scroll to enabled this layout. Note that when scroll mode is enabled, table-layout automatically switches to auto from fixed as a result table widths are likely to differ and resizable columns are not supported. Read more about table-layout for more details.
In stack layout, columns are displayed as stacked after a certain breakpoint. Default is '960px'. This feature is enabled by setting responsiveLayout to stack and adding an element whose class name is "p-column-title" to the body cells.
By Dorchies David on 2022-08-09T09:36:22 (imported from GitLab)
David Dorchiesmarked the checklist item Les cellules passent en mode flex (toutes les cellules en une colonne) sur les écrans de petite largeur as completed
marked the checklist item Les cellules passent en mode flex (toutes les cellules en une colonne) sur les écrans de petite largeur as completed
By Dorchies David on 2022-08-09T09:36:35 (imported from GitLab)