dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

SortableContext - Property "children" is missing in type but required in type "Props"

Open Kuzunu opened this issue 2 years ago • 3 comments

I have an issue: Property 'children' is missing in type '{ items: string[]; }' but required in type 'Props'

Property "children" is market as optional in DndContext but not in SortableContext.

Is it correct or is it me doing something wrong?

Kuzunu avatar Jun 05 '22 08:06 Kuzunu

Hey @Kuzry, you're not doing anything wrong, the types should allow for children to be optional in SortableContext. Having said that, I'm not sure how useful <SortableContext> will be if you don't provide it children.

I'll have this fixed in a future release.

clauderic avatar Jun 05 '22 14:06 clauderic

@clauderic Thanks for Your answer.

This generates an error in webpack compilation with TypeScipt. Is there currently a solution for this error?

Kuzunu avatar Jun 05 '22 19:06 Kuzunu

Pass JSX children to SortableContext

clauderic avatar Jun 05 '22 20:06 clauderic