React-Draggable ,我正在实现拖放功能,其中 div (带有图像和一些元素)必须拖放到不同的类别中,但是当我们拖动元素时,它只能在父div中拖动我们试图将它拖出来,div落后于div .

Draggable element:

<Draggable
        position={{ x: 0, y: 0 }}
        onDrag={this.props.groupPageDragStartHandler}
        onStop={(event) => this.props.groupPageDragStopHandler(event, this.props.group, this.props.pageInfo)}
        defaultClassNameDragging="groupItemDragging"
        >
        <div className="group-report-items col-sm-4">
            <div className="canvas-outer">
                <input type="checkbox" className="checkbox" id={checkBoxId} value={checkBoxId} checked={this.state.selected} />
            <canvas
                    className="groupCanvas"
                    id={canvasId}
                    height="792"
                    width="612"
                    ref="imageCanvas"
                    onClick={(event) => this.selectHandler(event, this.props.group, this.props.pageInfo)}></canvas>
            <a canvas-id={canvasId} href="javascript:void(0)" className="search">
                <i className="glyphicon glyphicon-search">
                </i>
                </a>
                <a href="javascript:void(0)" className="trash">
                    <i className="glyphicon glyphicon-trash" onClick={(event) => this.props.onPageDeleteHandler(event, this.props.group, this.props.pageInfo)}>
                </i>
            </a>
        </div></div></Draggable>

有没有办法可以将父div之外的元素拖动到所需的目的地,我正在使用 React with Typescript

Note: 我仍然能够将元素放入其目的地,但唯一的一点是div落后并且看起来有点糟糕 .