diff --git a/docs/Tree.md b/docs/Tree.md index 3af3c231940..e5501c59c6b 100644 --- a/docs/Tree.md +++ b/docs/Tree.md @@ -57,7 +57,7 @@ The `` component accepts the [rc-tree's ``](https://github.com/react | `onSelect` | Optional | `function` | - | The function to execute when a node is selected. | | `selectedKeys` | Optional | `Identifier[]` | - | An array of identifiers defining the records that should be selected (controlled mode). | | `sx` | Optional | `SxProps` | - | Material UI shortcut for defining custom styles. | -| `titleField` | Optional | `string` | `title` | Set the record field to display in the tree. | +| `titleField` | Optional | `string` | - | Set the record field to display in the tree. | ### `className` @@ -364,7 +364,7 @@ export const SimpleTree = () => ( ### `titleField` -Use the `titleField` prop to specify the name of the field holding the node title: +The default node title uses the [`recordRepresentation`](./Resource.md#recordrepresentation) of the resource. Use the `titleField` prop to specify the name of the field holding the node title: ```tsx import { Tree } from '@react-admin/ra-tree'; diff --git a/docs/TreeWithDetails.md b/docs/TreeWithDetails.md index 00e990aaa34..4f7709441ff 100644 --- a/docs/TreeWithDetails.md +++ b/docs/TreeWithDetails.md @@ -88,7 +88,7 @@ Check [the `ra-tree` documentation](https://react-admin-ee.marmelab.com/document | `showLine` | Optional | `boolean` | `false` | Shows a connecting line | | `sx` | Optional | `SxProps` | - | Material UI shortcut for defining custom styles | | `title` | Optional | `string` | - | The title to display in the `` | -| `titleField` | Optional | `string` | `title` | Set the record field to display in the tree | +| `titleField` | Optional | `string` | - | Set the record field to display in the tree | `` also accepts the [``](./Tree.md#props) props. @@ -443,7 +443,7 @@ The title can be either a string or an element of your own. ## `titleField` -Use the `titleField` prop to specify the name of the field holding the node title: +The default node title uses the [`recordRepresentation`](./Resource.md#recordrepresentation) of the resource. Use the `titleField` prop to specify the name of the field holding the node title: ```tsx // in src/posts.js