A
A
Alexey Aristov2016-05-27 18:35:39
Ember.js
Alexey Aristov, 2016-05-27 18:35:39

Is it possible to assign a table cell to dragula-container in ember-dragula?

I want to use ember-dragula to drag'n'drop and move divs between table cells.
There is a usage example at https://github.com/kalcifer/ember-dragula . Changed it a bit:

{{#ember-dragula config=dragulaconfig}}
<table class='table table-hover table-condensed table-bordered'>
  <thead>
    <tr><th>header 1</th><th>header 2</th></tr>
  </thead>
  <tbody>
    <tr>
      <td>
          {{#ember-dragula-container}}
              <div>drag me</div>
              <div>or me</div>
              <div>you can also drag me</div>
              <div>and me</div>
          {{/ember-dragula-container}}
      </td>
      <td>
          {{#ember-dragula-container}}
            <div>drag me</div>
            <div>or me</div>
            <div>you can also drag me</div>
            <div>and me</div>        
          {{/ember-dragula-container}}
        </td>
    </tr>
  </tbody>
</table>
{{/ember-dragula}}

So it turns out that divs appear in the cells of the table, on which you can throw elements. And I want the whole cell to be a dropzon. Can this be done and how?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question