We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DroppableContainer
Describe the issue:
There's a TS issue in the render props of the DroppableContainer when used with TypeScript.
No overload matches this call. Overload 1 of 2, '(props: { component: ElementType<any>; } & { component?: ElementType; } & Omit<BoxProps<"div", {}>, "component"> & { children: (props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode; nodes: any[]; onOrderChange?: (newOrder: any[]) => void; } & BoxOwnProps<...> & CommonProps & Omit<...>): Element', gave the following error. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'ReactNode & ((props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode)'. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'string & ((props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode)'. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'string'. Overload 2 of 2, '(props: DefaultComponentProps<BoxTypeMap<DroppableContainerProps<ElementType>, "div", Theme>>): Element', gave the following error. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'ReactNode & ((props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode)'. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'string & ((props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode)'. Type '({ nodes, getDragItemProps }: { nodes: PolicyInterface[]; getDragItemProps: GetDragItemProps; }) => JSX.Element[]' is not assignable to type 'string'.ts(2769) Box.d.ts(185, 3): The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { component: ElementType<any>; } & { component?: ElementType; } & Omit<BoxProps<"div", {}>, "component"> & { ...; } & BoxOwnProps<...> & CommonProps & Omit<...>' Box.d.ts(185, 3): The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { component?: ElementType; } & Omit<BoxProps<"div", {}>, "component"> & { children: (props: { dragHandlers: DragHandlers; getDragItemProps: GetDragItemProps; nodes: any[]; }) => ReactNode; nodes: any[]; onOrderChange?: (newOrder: any[]) => void; } & BoxOwnProps<...> & CommonProps & Omit<...>
How to reproduce:
Expected behavior:
There shouldn't be any TS issues.
Additional context :
The text was updated successfully, but these errors were encountered:
A temporary workaround is added with #327
Sorry, something went wrong.
No branches or pull requests
Describe the issue:
There's a TS issue in the render props of the
DroppableContainer
when used with TypeScript.How to reproduce:
DroppableContainer
in a TS file.Expected behavior:
There shouldn't be any TS issues.
Additional context :
The text was updated successfully, but these errors were encountered: