Skip to content

Drop target not working between two divs? #29

@galileomd

Description

@galileomd

hi, so i'm trying to drop elements from one div to another one.. it drags but doesnt drop into the second target. just extended the example code to add a second div - any suggestions?

console log shows both divs

import 'react-datepicker/dist/react-datepicker.css'
import * as React from "react";
import Dragula from 'react-dragula';

export class App extends React.Component {
  render () {
    return <div className='container' ref={this.dragulaDecorator}>
      <div>Swap me around</div>
      <div>Swap her around</div>
      <div>Swap him around</div>
      <div>Swap them around</div>
      <div>Swap us around</div>
      <div>Swap things around</div>
      <div>Swap everything around</div>
    </div>
<div className='container' ref={this.dragulaDecorator}>
</div>;
  },
  dragulaDecorator = (componentBackingInstance) => {
    if (componentBackingInstance) {
      let options = { };
      Dragula([componentBackingInstance], options);
      console.log(componentBackingInstance);
    }
  };
});
ReactDOM.render(<App />, document.getElementById('examples'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions