tiagobento commented on code in PR #2849:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2849#discussion_r1938025950


##########
packages/unitables-dmn/src/DmnRunnerOutputsTable.tsx:
##########
@@ -228,8 +250,38 @@ function OutputsBeeTable({ id, i18n, outputsPropertiesMap, 
results, scrollablePa
     [getRowValue]
   );
 
+  const resultsDecisionIds = useMemo(
+    () =>
+      results?.[0]?.reduce((set, result) => {
+        set.add(result.decisionId);
+        return set;
+      }, new Set()),
+    [results]
+  );
+
+  const openBoxedExpressionHeaderButton = useCallback(
+    ({ decisionId, decisionName }) => {
+      return (
+        <Button
+          variant={"plain"}
+          title={`Open '${decisionName}' expression`}
+          icon={<ArrowUpIcon />}
+          onClick={() => resultsDecisionIds!.has(decisionId) && 
openBoxedExpressionEditor?.(decisionId)}
+        />
+      );
+    },
+    [openBoxedExpressionEditor, resultsDecisionIds]
+  );
+
+  /**
+   * Wrapping 'getDefaultColumnWidth' to add additional space for the 
'<ArrowUp />' icon in the runner outputs columns.
+   */
+  const getDefaultDmnRunnerOutputColumnWidth = useCallback((label, dataType) 
=> {
+    return getDefaultColumnWidth({ name: label, typeRef: dataType }) + 100;

Review Comment:
   Please extract `100` to a nice constant and give it a long and descriptive 
name 😄 



-- 
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]

Reply via email to