Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Allowed type with nested demo #423

Open
florentplomb opened this issue Jun 13, 2017 · 1 comment
Open

Allowed type with nested demo #423

florentplomb opened this issue Jun 13, 2017 · 1 comment

Comments

@florentplomb
Copy link

Hello,

I'm trying to use the attribute "dnd-allowed-types" to the "Nested Containers demo" in order to have only item in container (no container in container) but I'm stuck.

I add an attribute "allowedTypes" in my templates like here:
$scope.models = { selected: null, templates: [ {type: "item", id: 2}, {type: "container", id: 1, allowedTypes: ["item"], columns: [[]]} ], dropzones: { "A": [ ]}}

For the HTML can some body tell me where I have to put the "dnd-type" and "dnd-allowed-types" attribute? In the list.html? or container.html?

@jaheraho
Copy link

Hi there,
you put dnd-allowed-types in the ul (where dnd-list defined) and put dnd-type in the li (where dnd-draggable is defined). dnd-allowed-types has to be an array of strings, dnd-type has to be an string (number leads to an error at the moment, until my pull request #468 is accepted)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants