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
Copy file name to clipboardExpand all lines: docs/DataTable.md
+39-10Lines changed: 39 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ title: "The DataTable Component"
7
7
8
8
The `<DataTable>` component renders a list of records as a table. It supports sorting, row selection for bulk actions, a collapsible panel, hiding and reordering columns, dynamic row and cell styles, and more.
Use `<DataTable>` inside a `ListContext` (e.g., as a descendent of [`<List>`](./List.md#list) or [`<ReferenceManyField>`](./ReferenceManyField.md)). Define the table columns with its children using `<DataTable.Col>` components:
@@ -141,7 +143,7 @@ const PostList = () => (
141
143
```
142
144
{% endraw %}
143
145
144
-
**Tip**: `<DataTable>` also lets you customize the table [header](#header) and [footer](#footer) components.
146
+
**Tip**: `<DataTable>` also lets you customize the table [header](#head) and [footer](#foot) components.
145
147
146
148
## `bulkActionButtons`
147
149
@@ -691,6 +693,33 @@ const PostList = () => (
691
693
692
694
**Tip**: To handle sorting in your custom DataTable head component, check out the [Building a custom sort control](./ListTutorial.md#building-a-custom-sort-control) section.
693
695
696
+
## `hiddenColumns`
697
+
698
+
By default, `<DataTable>` renders all `<DataTable.Col>` children. Use the `hiddenColumns` property to set hidden columns by default.
Using `hiddenColumns` instead of removing `<DataTable.Col>` elements allows hidden columns to be displayed again using a `<ColumnsButton>`, as explained in the [Hiding or Reordering Columns](#hiding-or-reordering-columns) section.
722
+
694
723
## `hover`
695
724
696
725
By default, when a user hovers over a row, the background color changes to indicate the row is active. Set the `hover` prop to `false` to disable this behavior.
@@ -714,7 +743,7 @@ Using the `isRowExpandable` prop, you can customize which rows can have a collap
714
743
For instance, this code shows an expand button only for rows that have a detail to show:
- Users must have the `'delete'` permission on the resource to see the `<BulkExportButton>`.
@@ -1757,7 +1786,7 @@ const ProductList = () => (
1757
1786
**Tip**: Adding the 'read' permission for the resource itself doesn't grant the 'read' permission on the columns. If you want a user to see all possible columns, add the 'read' permission on columns using a wildcard:
Copy file name to clipboardExpand all lines: docs/InPlaceEditor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ For example, to render a `<SelectField>` in read mode, you can use the following
158
158
159
159
The component to render in edit mode. By default, it's a `<TextInput>` using the `source` prop.
160
160
161
-
You can use any [input component](./Input.md) instead, as it renders in a `<Form>`. You will probably need to tweak the input variant, margin and style so that it matches the style of the read mode component.
161
+
You can use any [input component](./Inputs.md) instead, as it renders in a `<Form>`. You will probably need to tweak the input variant, margin and style so that it matches the style of the read mode component.
0 commit comments