react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Tab component typescript Error

Open chadfaurie opened this issue 6 years ago • 1 comments

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 to

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

chadfaurie avatar Oct 06 '20 09:10 chadfaurie

Please upgrade to react-admin 3.9.0 stable, this has already been fixed.

fzaninotto avatar Oct 08 '20 14:10 fzaninotto