bevacqua / react-dragula

:ok_hand: Drag and drop so simple it hurts
http://bevacqua.github.io/react-dragula
MIT License
994 stars 77 forks source link

how can i remove some containers from the dragula decorator ? #24

Closed EssamTarik closed 7 years ago

EssamTarik commented 7 years ago

i have a react component that under some conditions , needs to disable the drag and drop abilities on some elements

so after the dragula component was instantiated with 3 containers how can i remove some of them ?

i tried using react's state and it didnt work , the decorator didnt update on setState

EssamTarik commented 7 years ago

I solved it by calling destroy() on the dragula object then creating a new one with the updated containers