ljmotta commented on code in PR #2918:
URL:
https://github.com/apache/incubator-kie-tools/pull/2918#discussion_r2021058148
##########
packages/dmn-editor-envelope/src/DmnEditorFactory.tsx:
##########
@@ -101,16 +104,18 @@ export class DmnEditorInterface implements Editor {
}
// This component is a wrapper. It memoizes the DmnEditorRoot props beforing
rendering it.
-function DmnEditorRootWrapper({
+export function DmnEditorRootWrapper({
envelopeContext,
exposing,
workspaceRootAbsolutePosixPath,
isReadOnly,
+ onOpenedBoxedExpressionChange,
}: {
envelopeContext?: KogitoEditorEnvelopeContextType<KogitoEditorEnvelopeApi,
KogitoEditorChannelApi>;
exposing: (s: DmnEditorRoot) => void;
workspaceRootAbsolutePosixPath: string;
isReadOnly: boolean;
+ onOpenedBoxedExpressionChange?: (newOpenedBoxedExpressionId: string |
undefined) => void;
Review Comment:
Here you are using the `BoxedExpressionId` again.
##########
packages/online-editor/src/dmnRunner/DmnRunnerDrawerPanelContent.tsx:
##########
@@ -339,6 +345,7 @@ export function DmnRunnerDrawerPanelContent() {
}
: undefined
}
+ openedBoxedExpressionId={openedBoxedExpressionNodeId}
Review Comment:
And here you're passing a `openedBoxedExpressionNodeId` to
`openedBoxedExpressionId`.
##########
packages/dmn-editor/src/DmnEditor.tsx:
##########
@@ -207,6 +211,13 @@ export const DmnEditorInternal = ({
const { dmnModelBeforeEditingRef, dmnEditorRootElementRef } = useDmnEditor();
const { externalModelsByNamespace } = useExternalModels();
+ // Code to keep FormDmnOutputs.tsx selected card highlight in proper state
+ useEffect(() => {
+ onOpenedBoxedExpressionChange?.(
+ dmnEditorActiveTab === DmnEditorTab.EDITOR ?
boxedExpressionEditorActiveDrgElementId : undefined
Review Comment:
Based on this line, the `id` of the `newOpenedBoxedExpressionId` is the
`drgElementId` and not the Boxed Expression Id.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]