Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

feat(app): add copy for lists in details-panel

bjst0ne5cdd8e70af1d
diff --git a/flowsint-app/src/components/sketches/details-panel/details-panel.tsx b/flowsint-app/src/components/sketches/details-panel/details-panel.tsx
index 36e42ebe..5d78afd3 100644
--- a/flowsint-app/src/components/sketches/details-panel/details-panel.tsx
+++ b/flowsint-app/src/components/sketches/details-panel/details-panel.tsx
@@ -275,6 +275,15 @@ const DetailsPanel = memo(() => {
[handleChange]
)
+ const copyField = (value: any): string | undefined => {
+ if (typeof value === 'string')
+ return value
+ else if (Array.isArray(value) && value.length > 0)
+ return value.join(',')
+ else
+ return undefined
+ }
+
// Empty state
if (!node) {
return (
@@ -363,7 +372,7 @@ const DetailsPanel = memo(() => {
<RowWithCopy
key={key}
label={key}
- copyValue={typeof value === 'string' ? value : undefined}
+ copyValue={copyField(value)}
>
{typeof value === 'boolean' ? (
<Switch