From c09a6eb41cfd75148a012dda30f84283ee8335c6 Mon Sep 17 00:00:00 2001 From: Tim Arney Date: Mon, 11 Mar 2024 12:57:21 -0400 Subject: [PATCH] fix: add comment - 3314 (#3316) Add comment --- .../app/shared/conditionals/ConditionalIndicator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form-builder/app/shared/conditionals/ConditionalIndicator.tsx b/components/form-builder/app/shared/conditionals/ConditionalIndicator.tsx index 6cad59b341..7177a3d8ae 100644 --- a/components/form-builder/app/shared/conditionals/ConditionalIndicator.tsx +++ b/components/form-builder/app/shared/conditionals/ConditionalIndicator.tsx @@ -16,8 +16,8 @@ const RuleIndicator = ({ choiceId }: { choiceId: string }) => { ); const elements = useTemplateStore((state) => state.form.elements); + // Ensure elements are sorted by layout const sortedElements = sortByLayout({ layout, elements: [...elements] }); - const parentId = Number(choiceId.split(".")[0]); const childId = Number(choiceId.split(".")[1]); const choice = getChoice(parentId, childId);