From 107799e18a48c5930b384e7b6d4d903a7464610c Mon Sep 17 00:00:00 2001 From: Dennis Collaris <d.a.c.collaris@uu.nl> Date: Fri, 15 Nov 2024 14:23:37 +0000 Subject: [PATCH] fix: prevent nodelink crash when selecting a node --- .../lib/vis/components/config/SelectionConfig.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/shared/lib/vis/components/config/SelectionConfig.tsx b/libs/shared/lib/vis/components/config/SelectionConfig.tsx index 4f178a273..142954728 100644 --- a/libs/shared/lib/vis/components/config/SelectionConfig.tsx +++ b/libs/shared/lib/vis/components/config/SelectionConfig.tsx @@ -11,7 +11,7 @@ export const SelectionConfig = () => { if (!selection) return null; return ( - <div className="border-b py-2"> + <div className="border-b py-2 overflow-auto"> <div className="flex justify-between items-center px-4 py-2"> <span className="text-xs font-bold">Selection</span> <Button @@ -27,19 +27,19 @@ export const SelectionConfig = () => { {selection.content.map((item, index) => ( <React.Fragment key={index + 'id'}> <div className="flex justify-between items-center px-4 py-1 gap-1"> - <span className="text-xs font-normal">ID</span> + <span className="text-xs font-semibold pr-2">ID</span> <span className="text-xs">{item._id}</span> </div> <div key={index + 'label'} className="flex justify-between items-center px-4 py-1 gap-1"> - <span className="text-xs font-normal">Label</span> + <span className="text-xs font-semibold pr-2">Label</span> <EntityPill title={item.attributes['labels'] as string}></EntityPill> </div> {Object.entries(item.attributes).map(([key, value]) => { - if (key === 'labels' || key === '_id') return null; + if (key === 'labels' || key === '_id' || value instanceof Object) return null; return ( <div key={index + key} className="flex justify-between items-center px-4 py-1 gap-1"> - <span className="text-xs font-normal break-all max-w-[6rem]">{String(key)}</span> - <span className="text-xs break-all">{value as string}</span> + <span className="text-xs font-semibold pr-2 whitespace-nowrap max-w-[6rem]">{String(key)}</span> + <span className="text-xs break-all">{String(value)}</span> </div> ); })} -- GitLab