-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kie-issues#1376: The width information are not being deleted from DMN when the expression is deleted in the new Boxed Expression Editor #2602
Conversation
…rom DMN when the expression is deleted in the new Boxed Expression Editor
@@ -89,7 +89,6 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec | |||
const dmnEditorStoreApi = useDmnEditorStoreApi(); | |||
|
|||
const thisDmn = useDmnEditorStore((s) => s.dmn); | |||
const diagram = useDmnEditorStore((s) => s.diagram); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaning. This constant wast not being used.
@@ -30,20 +30,9 @@ export function updateExpressionWidths({ | |||
drdIndex: number; | |||
widthsById: Map<string, number[]>; | |||
}): void { | |||
const { widthsExtension, widths } = addOrGetDrd({ definitions, drdIndex }); | |||
const componentWidthsMap = widths.reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was that we were always reloading all the widths from the definitions
into the widthsById
.
They are loaded the first time here:
incubator-kie-tools/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx
Line 146 in e21bbd8
const widthsById = useMemo(() => { |
And then the Boxed Expression Editor is who changes the widthsById
.
The updateExpressionWidth
should only update the definitions
from widthsById
, not fill the widthsById
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seem to work properly to me. Thank you @danielzhe
Closes: apache/incubator-kie-issues#1376