Fix false child acceptance criteria sync
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user