dnd-kit
dnd-kit copied to clipboard
SortableContext - Property "children" is missing in type but required in type "Props"
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?
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 Thanks for Your answer.
This generates an error in webpack compilation with TypeScipt. Is there currently a solution for this error?
Pass JSX children to SortableContext