This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 34e072351d7 kie-issues#1635: DMN Editor can not reopen List expression 
(#2851)
34e072351d7 is described below

commit 34e072351d74476794992a5fa6c5d69c5887ad95
Author: Kusuma04-dev <[email protected]>
AuthorDate: Fri Feb 14 00:16:04 2025 +0530

    kie-issues#1635: DMN Editor can not reopen List expression (#2851)
    
    Co-authored-by: chinnamatli kusumalatha 
<[email protected]>
---
 .../src/expressions/ListExpression/ListExpression.tsx                   | 2 +-
 packages/boxed-expression-component/src/resizing/WidthMaths.ts          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/packages/boxed-expression-component/src/expressions/ListExpression/ListExpression.tsx
 
b/packages/boxed-expression-component/src/expressions/ListExpression/ListExpression.tsx
index a037ea079c4..9bf48bfd9c2 100644
--- 
a/packages/boxed-expression-component/src/expressions/ListExpression/ListExpression.tsx
+++ 
b/packages/boxed-expression-component/src/expressions/ListExpression/ListExpression.tsx
@@ -116,7 +116,7 @@ export function ListExpression({
   const beeTableRows = useMemo(() => {
     const rows = (listExpression.expression ?? []).map((item) => ({
       "@_id": generateUuid(),
-      expression: item,
+      expression: item?.__$$element ? item : undefined!,
     }));
 
     if (rows.length === 0) {
diff --git a/packages/boxed-expression-component/src/resizing/WidthMaths.ts 
b/packages/boxed-expression-component/src/resizing/WidthMaths.ts
index 6b516671066..f5cdc420268 100644
--- a/packages/boxed-expression-component/src/resizing/WidthMaths.ts
+++ b/packages/boxed-expression-component/src/resizing/WidthMaths.ts
@@ -238,7 +238,7 @@ export function getExpressionResizingWidth(
   resizingWidths: Map<string, ResizingWidth>,
   widthsById: Map<string, number[]>
 ): number {
-  if (!expression) {
+  if (!expression || !expression.__$$element) {
     return getExpressionMinWidth(expression);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to