atlassian / react-beautiful-dnd

Beautiful and accessible drag and drop for lists with React

Home Page:https://react-beautiful-dnd.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Droppable should only accept Draggables of same type ... but it doesn't work

devnull69 opened this issue · comments

Expected behavior

When you use the type prop on Droppables and Draggables, I expect only Draggables of the same type to be droppable. But instead, the type of the draggable is not correctly considered

Actual behavior

When dropping a draggable of type B to a droppable of type A, the type of the draggable is shown as A and the drop is accepted

Steps to reproduce

Please see this stackblitz

What version of React are you using?

^18.2.0

What version of react-beautiful-dnd are you running?

^13.1.1

What browser are you using?

Firefox latest

I found out that Draggables automatically inherit their type from the Droppable they are placed in. Therefore, my concept was bad and no fix is necessary