Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listFieldTypes. source error #10435

Open
DmitriyMalayev opened this issue Jan 6, 2025 · 2 comments
Open

listFieldTypes. source error #10435

DmitriyMalayev opened this issue Jan 6, 2025 · 2 comments

Comments

@DmitriyMalayev
Copy link

What you were expecting:
Following react admin tutorial
ListGuesser tsx gives error below

What happened instead:
Argument of type '{ table: { component: (props: any) => Element; representation: (_props: any, children: any) => string; }; array: { component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }; ... 11 more ...; url: { ...; }; }' is not assignable to parameter of type 'InferredTypeMap'.
Property 'array' is incompatible with index signature.
Type '{ component: ({ children, ...props }: ArrayFieldProps<Record<string, any>>) => Element; representation: (props: any, children: any) => string; }' is not assignable to type 'InferredType'.
Types of property 'component' are incompatible.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'ComponentType | undefined'.
Type '({ children, ...props }: ArrayFieldProps) => React.JSX.Element' is not assignable to type 'FunctionComponent<{}>'.
Types of parameters '__0' and 'props' are incompatible.
Property 'source' is missing in type '{}' but required in type 'ArrayFieldProps<Record<string, any>>'.ts(2345)
types.ts(59, 5): 'source' is declared here.

Steps to reproduce:

Related code:

insert short code snippets here

Other information:

Environment

  • React-admin version:
  • Last version that did not exhibit the issue (if applicable):
  • React version:
  • Browser:
  • Stack trace (in case of a JS error):
@DmitriyMalayev
Copy link
Author

Image
Image

@DmitriyMalayev DmitriyMalayev changed the title listFieldTypes listFieldTypes. source error Jan 6, 2025
@djhi
Copy link
Collaborator

djhi commented Jan 7, 2025

Thanks for reporting this. Please provide a sample application showing the issue, preferably a sandbox forked from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants