I'm using react-beautiful-dnd
:
<DragDropContext>
<Droppable>
{(provided, snapshot) => (
<div>
<Draggable><Item with Slider></Draggable>
<Draggable><Item with Slider></Draggable>
<Draggable><Item with Slider></Draggable>
<Draggable><Item with Slider></Draggable>
etc
</div>
)}
</Droppable>
</DragDropContext>
My understanding is that Draggable
will have some variety of event listeners to allow it to detect when it is clicked/clicked and dragged/etc.
The Slider
component that I'm using will also have similar events (since I assume it provides similar event listeners to Draggable
).
How can I either:
- Get
react-beautiful-dnd
to ignore events emitted from certain targets
or
- Stop event propagation so that
react-beautiful-dnd
doesn't receive an event?
The screenshot below shows two sliders - (1) a React component (material-ui
) and (2) an <input type="range" />
component. The normal range works fine (doesn't trigger drag and drop) while the Slider does not.