Fix false child acceptance criteria sync
linter / quality (pull_request) Successful in 1m20s
tests / ci (8.4) (pull_request) Successful in 1m31s

This commit is contained in:
2026-05-20 13:46:50 +00:00
parent 2bc7745e53
commit 31c5025185
3 changed files with 134 additions and 31 deletions
+4 -1
View File
@@ -75,17 +75,20 @@ export const syncAcceptanceCriteriaDescendantCheckedState = (
}
const parentIndent = items[index]?.indent ?? 0;
let isWithinDescendantRange = true;
return items.map((item, itemIndex) => {
if (itemIndex === index) {
return { ...item, checked };
}
if (itemIndex < index) {
if (itemIndex < index || !isWithinDescendantRange) {
return item;
}
if (item.indent <= parentIndent) {
isWithinDescendantRange = false;
return item;
}