Open seanock opened 2 years ago
Same is the case for I'm getting.
No overload matches this call.
Overload 1 of 2, '(props: Partial<DraggableProps> | Readonly<Partial<DraggableProps>>): Draggable', gave the following error.
Type '{ children: Element; handle: string; bounds: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Draggable> & Pick<Readonly<Partial<DraggableProps>>, never> & InexactPartial<...> & InexactPartial<...>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Draggable> & Pick<Readonly<Partial<DraggableProps>>, never> & InexactPartial<...> & InexactPartial<...>'.
Overload 2 of 2, '(props: Partial<DraggableProps>, context: any): Draggable', gave the following error.
Type '{ children: Element; handle: string; bounds: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Draggable> & Pick<Readonly<Partial<DraggableProps>>, never> & InexactPartial<...> & InexactPartial<...>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Draggable> & Pick<Readonly<Partial<DraggableProps>>, never> & InexactPartial<...> & InexactPartial<...>'.
It seems the reason for the error is: children
prop from react-18 has been removed and react-draggable
is not handling it.
Yes, if we update to the latest version, this problem solves. I think this issue can be closed.
TS2322: Type '{ children: Element[]; list: TagItem[]; setList: Dispatch<SetStateAction<TagItem[]>>; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactSortable> & Pick<Readonly<ReactSortableProps>, never> & InexactPartial<...> & InexactPartial<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactSortable> & Pick<Readonly<ReactSortableProps>, never> & InexactPartial<...> & InexactPartial<...>'.
my code:
type TagItem = { id: number, name: string, parent_id: number }