ember-drag-drop icon indicating copy to clipboard operation
ember-drag-drop copied to clipboard

fix the draggable-object-target lose the class accepts-drag

Open Igor-Rabodzei opened this issue 5 years ago • 2 comments

I have a structure like this

 {{#draggable-object-target action=(action 'dragItem') folderId=folderId}}
   {{#each activeLists as |list index|}}
         {{#draggable-object content=list}}
              {{sidebar-list-item
                list=list index=index moreLinksOpen=moreLinksOpen reloadList=(action "reloadList")
                openList=openList
             }}
         {{/draggable-object}}
 {{/draggable-object-target}}


 {{#draggable-object-target action=(action 'dragItem') folderId=folderId}}
   {{#each activeLists as |list index|}}
         {{#draggable-object content=list}}
              {{sidebar-list-item
                list=list index=index moreLinksOpen=moreLinksOpen reloadList=(action "reloadList")
                openList=openList
             }}
         {{/draggable-object}}
 {{/draggable-object-target}}

If I try to drag item and hover the draggable-object that the draggable-object-target lose the class accepts-drag

Why the draggable-object should return false on Code . ??? If we set to return true it will be work!

Igor-Rabodzei avatar Nov 13 '19 18:11 Igor-Rabodzei

You shouldn't have the draggable-object inside the draggable-object-target it isn't meant to work that way. You might be able to make it work, but I'm not sure. You might be looking for sortable items in which case take a look at the readme, that might work for you.

dgavey avatar Nov 13 '19 20:11 dgavey

@dgavey I need to highlight an area where I drag the item The draggable-object-target represents a place to drag objects. The draggable-object component represents an object you want to drag onto a target. I have many folders - draggable-object-targets And in those folders many items - draggable-objects

Igor-Rabodzei avatar Nov 14 '19 09:11 Igor-Rabodzei