Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/Tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `<Tree>` component accepts the [rc-tree's `<Tree>`](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`

Expand Down Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions docs/TreeWithDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<AppBar>` |
| `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 |

`<TreeWithDetails>` also accepts the [`<Tree>`](./Tree.md#props) props.

Expand Down Expand Up @@ -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
Expand Down
Loading