[experimental] Drag area not restricted to handle when using separate hooks
I'm trying to implement a table with row reordering using dnd-kit, like the example given here https://tanstack.com/table/latest/docs/framework/react/examples/row-dnd
Because of the way TanStack Table works, the component where I need to attach the ref and the component to use as the drag handle are in different places where I cannot easily pass around a ref from a common ancestor.
In the example given, they use two separate hooks with the same id, and that seems to give the wanted behaviour of the row only becoming draggable from the handle.
It seems that when I do it using the new version, it only makes the row not draggable when the handleRef is applied from the same hook that is supplying the ref.
I'm not sure what the intended behaviour is here, but it would be helpful to be able to get a handleRef from a separate hook and have interaction connected automatically through the DragDropProvider.
I'm sure I can work something with custom context, but just want to know if this is a bug or not.
I'm surprised that guidance ever worked to be quite honest. Try this out https://github.com/clauderic/dnd-kit/pull/1740
That works perfectly, thank you! I was able to make it work with a custom context, but this is more ergonomic, even though it does expand the API surface