fix: DRAG Only possible with Button component or in edit description component.

This commit is contained in:
Paolo Arena
2019-02-20 17:54:48 +01:00
parent 6a99f22bf3
commit 77568f02f5
6 changed files with 132 additions and 60 deletions

View File

@@ -54,8 +54,13 @@ namespace Mutations {
return -1
}
function createNewItem(state: ITodosState, myitem: ITodo) {
state.todos.push(myitem)
function createNewItem(state: ITodosState, { objtodo, atfirst }) {
console.log('atfirst', atfirst)
if (atfirst)
state.todos.unshift(objtodo)
else
state.todos.push(objtodo)
Todos.mutations.setTodos_changed()
}