react-admin
react-admin copied to clipboard
Tab component typescript Error
What you were expecting: A tab component to render
What happened instead: Got typescript compilation error:
TypeScript error in ...
Type '{ children: Element[]; label: string; }' is missing the following properties from type '{ [x: string]: any; basePath: any; children: any; contentClassName: any; context: any; className: any; icon: any; label: any; record: any; resource: any; value: any; }': basePath, contentClassName, context, className, and 4 more.
Steps to reproduce:
CRA with Typescript template, add a
Related code:
export const ProviderShow: FunctionComponent = (props) => (
<Show {...props}>
<TabbedShowLayout>
<Tab label="Summary">
<TextField source="description" />
<TextField source="id" />
</Tab>
</TabbedShowLayout>
</Show>
);
Environment
- React-admin version: ^3.9.0-beta.3
- React version: 16.13.1
- Browser: Chrome
- Stack trace (in case of a JS error):
- typescript: ~4.0.3
Please upgrade to react-admin 3.9.0 stable, this has already been fixed.