This commit is contained in:
lubiana 2025-07-25 16:15:22 +02:00
parent ebd50740f0
commit 1a6d7291c4
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
6 changed files with 496 additions and 75 deletions

View file

@ -133,8 +133,8 @@ export default function Checklist() {
}
}
const renderItems = (items: ChecklistItemType[]) => {
return items.map(item => (
const renderItems = (treeItems: ChecklistItemType[], allItems: ChecklistItemType[]) => {
return treeItems.map(item => (
<ChecklistItem
key={item.id}
item={item}
@ -142,6 +142,7 @@ export default function Checklist() {
onDelete={deleteItem}
onLock={lockItem}
children={item.children || []}
allItems={allItems}
/>
))
}
@ -236,7 +237,7 @@ export default function Checklist() {
</div>
) : (
<ul>
{renderItems(itemTree)}
{renderItems(itemTree, items)}
</ul>
)}
</div>