dnd-multi-backend icon indicating copy to clipboard operation
dnd-multi-backend copied to clipboard

Help | using latest v8 version - preview on drag elements in touch screens.

Open rohitkunala opened this issue 2 years ago • 2 comments

For Desktop , I proceeded as per latest v8 docs suggest and preview is working fine for desktop. For mobile( touch ) - Can you please update the docs on what changes to be done to get the preview on dragging elements ?

The below is my code - which works good (preview) for desktop and not for touch screens.

import { DndProvider } from "react-dnd-multi-backend";
import { HTML5toTouch } from 'rdndmb-html5-to-touch'

function Home() {
  return (
      <DndProvider options={HTML5toTouch}>
        <ReactComponent />
      </DndProvider>
  );
}

rohitkunala avatar Jun 19 '23 10:06 rohitkunala

@LouisBrunner can you please help me with some examples or any doc links ?

rohitkunala avatar Jun 19 '23 10:06 rohitkunala

@rohitkunala

Hi, please refer to the "Preview" section of react-dnd-multi-backend which explain 3 different ways (hook, context, function) to generate your preview: https://github.com/LouisBrunner/dnd-multi-backend/tree/main/packages/react-dnd-multi-backend#preview

Here is some example code https://github.com/LouisBrunner/dnd-multi-backend/blob/main/packages/react-dnd-multi-backend/examples/App.tsx#L68

LouisBrunner avatar Jun 19 '23 11:06 LouisBrunner