I have some placeholder elements, which should not be used as drop location. Is there an option to disable some drop locations or to hide some drop locations? I know that you shouldn't do this

Do not add any child elements that aren't meant to be draggable

but isn't that, what accepts is for?

this.dragulaService.createGroup('cards', {
  accepts: (el, target, source, sibling) => {
    if (sibling !== null && sibling.classList.contains('invisible'))
      return false;

    return true;
  }
});

The issue is that target, and source are containers. I would need the new location as target, but the closest thing I've got is sibling (which is not what I want).

drop and over events also seem to take only containers into account.

Is there any solution for this?

0 Answers