diff --git a/docs/BooleanField.md b/docs/BooleanField.md index 4ae3e6a3f03..62f66d10b29 100644 --- a/docs/BooleanField.md +++ b/docs/BooleanField.md @@ -67,33 +67,3 @@ import AlarmOnIcon from '@mui/icons-material/AlarmOn'; ``` - -## TypeScript - -The `` component accept a generic type that describe the record. This is used to validate the `source` prop to ensure it targets an actual property of the record: - -```tsx -import * as React from "react"; -import { Show, SimpleShowLayout, TextField, BooleanField, RichTextField } from 'react-admin'; - -type Post = { - id: number; - title: string; - teaser: string; - body: string; - published: boolean; -} - -export const PostShow = () => ( - - - source="title" /> - source="teaser" /> - source="body" /> - source="published" /> - - -); -``` - -Specifying the record type will also allow your IDE to provide auto-completion for both the `source` and `sortBy` prop. Note that the `sortBy` prop also accept any string.