-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
This is related to #56
Let's have a look at the ReactBootstrap and Bootstrap Modals side by side. I have updated the repository to include a Bootstrap example also https://github.com/cosminnicula/ReactBootstrapModalDraggable
1.Bootstrap -> this works
<Draggable handle=".modal-header">
<div className="modal">
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header">
...
</div>
</div>
</div>
</Draggable>
2.ReactBootstrap -> this does not work
<Draggable handle=".modal-header">
<Modal>
...
</Modal>
</Draggable>
Under the hood, <Modal />
generates the same HTML mark-up as 1.
Questions:
a) Since 2. is equivalent to 1. in terms of HTML mark-up, why <Dragglable />
would not work with 2. ? (not asking technical details, but rather as a client of the library)
b) If <Draggable />
wants to cover more use cases, it has to be more flexible in terms where in the HTML structure needs to be included. E.g. if ReactBootstrap, or any other component decides not to expose a renderer function or a custom component, then <Draggable />
cannot be used. A solution would be for <Draggable />
to be agnostic of the HTML structure position and rely only on the handle
property. Is this make sense?
Would ❤️ to see these two questions addressed!