react-movable icon indicating copy to clipboard operation
react-movable copied to clipboard

Expose needle position and currently dragging index

Open ben-styling opened this issue 3 years ago • 2 comments

Hi here,

Firstly thank you for this library!

This PR includes 2 changes.

  1. itemDragged is exposed to the renderItem function
  2. needle is exposed to the renderList function as a getter prop getNeedle

This change allows for some more flexible styling based on the "needle" position.

ben-styling avatar Jun 30 '22 21:06 ben-styling

Can you add an example that uses these new APIs in a realistic case?

Side note: I need to fix CI tests / move them over to Github actions.

tajo avatar Jul 05 '22 21:07 tajo

Can you add an example that uses these new APIs in a realistic case?

Sorry for the delayed response. I've added an example for InsertNeedle.

The actual styling of this is a bit of a hack as I intended to make minimal changes to the library while still being able to style like this.

ben-styling avatar Jul 13 '22 17:07 ben-styling