fix(lists): moving a list into another namespace on the first position

Resolves https://kolaente.dev/vikunja/frontend/issues/2240
This commit is contained in:
kolaente 2022-08-16 23:21:34 +02:00
parent 7bbd452f3b
commit a84fb8b5df
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -243,7 +243,7 @@ function updateActiveLists(namespace: NamespaceModel, activeLists: ListModel[])
const listUpdating = ref<{ [id: NamespaceModel['id']]: boolean }>({}) const listUpdating = ref<{ [id: NamespaceModel['id']]: boolean }>({})
async function saveListPosition(e: SortableEvent) { async function saveListPosition(e: SortableEvent) {
if (!e.newIndex) return if (!e.newIndex && e.newIndex !== 0) return
const namespaceId = parseInt(e.to.dataset.namespaceId as string) const namespaceId = parseInt(e.to.dataset.namespaceId as string)
const newNamespaceIndex = parseInt(e.to.dataset.namespaceIndex as string) const newNamespaceIndex = parseInt(e.to.dataset.namespaceIndex as string)