1
0

fix(task): marking checklist items as done

This commit is contained in:
kolaente
2022-10-23 14:39:28 +02:00
parent 7e218e03b2
commit d7fb1a1e14
2 changed files with 33 additions and 3 deletions

View File

@ -285,9 +285,9 @@ function handleCheckboxClick(e: Event) {
console.debug('no index found')
return
}
console.debug(index, text.value.slice(index, 9))
const listPrefix = text.value.slice(index, 1)
const listPrefix = text.value.substring(index, index + 1)
console.debug({index, listPrefix, checked, text: text.value})
text.value = replaceAt(text.value, index, `${listPrefix} ${checked ? '[x]' : '[ ]'} `)
bubble()