From 295c58200fd87ecd220c15119e2266a3081444f1 Mon Sep 17 00:00:00 2001 From: ifirmawan Date: Thu, 27 Jun 2024 18:19:40 +0700 Subject: [PATCH] [#1050] Use last previous administration answer to get entity list --- app/src/form/fields/TypeCascade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/form/fields/TypeCascade.js b/app/src/form/fields/TypeCascade.js index 94b6f554e..5c4d42c87 100644 --- a/app/src/form/fields/TypeCascade.js +++ b/app/src/form/fields/TypeCascade.js @@ -113,7 +113,7 @@ const TypeCascade = ({ return []; } const parentIDs = - cascadeParent === 'administrator.sqlite' ? prevAdmAnswer || [] : parentId || [0]; + cascadeParent === 'administrator.sqlite' ? prevAdmAnswer?.slice(-1) || [] : parentId || [0]; const filterDs = dataSource ?.filter((ds) => { if (cascadeParent) {