ljmotta commented on code in PR #2943:
URL:
https://github.com/apache/incubator-kie-tools/pull/2943#discussion_r2081492405
##########
packages/online-editor/src/dmnRunner/DmnRunnerContextProvider.tsx:
##########
@@ -328,6 +330,19 @@ export function DmnRunnerContextProvider(props:
PropsWithChildren<Props>) {
[props.dmnLanguageService, props.workspaceFile.relativePath,
props.workspaceFile.workspaceId, workspaces]
);
+ const findDecisionIdIdBySourceId = useMemo(
+ () => (sourceid: any) => {
+ if (!Array.isArray(invalidElementPaths)) return "";
+ for (const path of invalidElementPaths) {
+ if (path.includes(sourceid)) {
+ return path[0];
+ }
+ }
+ return "";
+ },
+ [invalidElementPaths]
+ );
Review Comment:
Why not a `useCallback`? Please fix the `sourceid` typo, and add the
`sourceId` type.
--
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]