You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, `<DataTable>` renders all `<DataTable.Col>` children. Use the `hiddenColumns` property to set hidden columns by default.
842
+
843
+
Using the `hiddenColumns` property instead of removing `<DataTable.Col>` elements entirely allows hidden columns to be displayed again using a `ColumnsButton`, as in [Hiding or Reordering](#hiding-or-reordering-columns) section.
844
+
845
+
```tsx
846
+
const PostList = () => (
847
+
<Listactions={<PostListActions />}>
848
+
<DataTablehiddenColumns={['id', 'author']}>
849
+
<DataTable.Colsource="id" />
850
+
<DataTable.Colsource="title" />
851
+
<DataTable.Colsource="author" />
852
+
<DataTable.Colsource="year" />
853
+
</DataTable>
854
+
</List>
855
+
);
856
+
```
857
+
839
858
## `size`
840
859
841
860
The `<DataTable>` is designed for a high content density, so the row padding is low. If you want to add more margin to each cell, set the `size` prop to `medium`.
0 commit comments