Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-dropzone execute only last function declared #3

Open
federicodionisi opened this issue Mar 17, 2015 · 0 comments
Open

v-dropzone execute only last function declared #3

federicodionisi opened this issue Mar 17, 2015 · 0 comments

Comments

@federicodionisi
Copy link

Hi,
I have this two list:

SOURCE
li( v-repeat="currentPagination | textFilter | selectFilter" v-draggable="product: $index" )
TARGET
li( v-repeat="currentPagination" v-draggable="reorder: $index" v-dropzone="product: insert($dropdata, $index), reorder($dropdata, $index)" )

I want to insert from the SOURCE to the TARGET and reorder the TARGET.
Depending on the order of the code inside "v-dropzone" declaration, drag'n'drop it's triggering only the last action (in my case the "reorder").

For now, I've implement a workaround for this issue, that consist in using only one "droptag" with inside a property named "action" that describe witch method have to trigger.

SOURCE
li( v-repeat="currentPagination | textFilter | selectFilter" v-draggable="product: { index: $index, action: 'insert'}" )
TARGET
li( v-repeat="currentPagination" v-draggable="product: { index: $index, action: 'move'}" v-dropzone="product: action($dropdata, $index)" )

It is a bit dirty and I do not like it, but at least, for now it's working.
@lain-dono can you help me to understand this issue?

I am using vue 0.11.5 and vue-dnd 0.1.1

Thanks in advance

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

No branches or pull requests

1 participant