Closed pardeshirzadeh closed 10 months ago
Hmm, I don't understand. What does "not work" mean here?
I updated the first comment with more details. Hope it's more clear now
This is still a current issue on latest version. Any updates?
Ah yes, I was just looking at this. I think we should use Component
here still to maintain return type etc.
Unfortunately, it didn't solve the issue.
TS2322: Type '(draggable: Draggable$1 | null) => Element' is not assignable to type '((number | boolean | Node | ArrayElement | (string & {}) | ((activeDraggable: Draggable$1 | null) => Element)) & (number | boolean | Node | ArrayElement | (string & {}))) | null | undefined'. Type '(draggable: Draggable$1 | null) => Element' is not assignable to type '((activeDraggable: Draggable$1 | null) => Element) & number'. Type '(draggable: Draggable$1 | null) => Element' is not assignable to type 'number'.`
took latest commit, it did solved the issue as far as I can tell :)
Thanks @Adevien - @malekim I wonder why not working for you 🤔
DragOverlay
is currently defined asParentComponent<DragOverlayProps>
, but it doesn't work in the following scenario in a.tsx
file:It will throw the following error
The reason for that is because
ParentComponent
overrideschildren
, so the definition inDragOverlayProps
is ignored.