how to make reactstrap modal draggable? I have tried by using react-draggable plugin but it is not working properly. It is work only inner section of whole modal. My code is given below.
if i use < Draggable > component into inner section of < Modal > tag then it is worked and move header text as well as body text. it should be worked for whole modal if anybody there please help me.
import React, { Component } from "react";
import { Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap";
import Draggable from "react-draggable";
class DraggableModal extends Component {
render() {
return (
<div>
<Draggable>
<Modal
isOpen={this.state.showModal}
toggle={() => {
this.setState({ showModal: false });
this.props.modalClose();
}}
>
<ModalHeader
className="modal-header bg-primary modal-title text-white"
toggle={() => {
this.setState({ showModal: false });
this.props.modalClose();
}}
>
Test Header
</ModalHeader>
{this.state.loading ? <Spinner /> : ""}
<ModalBody
style={{
height: modalSettings.modalBodyHeight + "px"
}}
>
<div
className="form-group row"
>
<div className="formRow col-sm-12">{this.renderData()}</div>
</div>
</ModalBody>
</Modal>
</Draggable>
</div>
);
}
}