From 6b283c484eae514d336d756726c32aec62874206 Mon Sep 17 00:00:00 2001 From: xbinaryx Date: Fri, 18 Apr 2025 18:19:32 +0300 Subject: [PATCH] refactor: remove accordion behavior for non-array nodes --- src/components/scope/scope-item.tsx | 41 +++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/scope/scope-item.tsx b/src/components/scope/scope-item.tsx index 221c8ec8..4b477c78 100644 --- a/src/components/scope/scope-item.tsx +++ b/src/components/scope/scope-item.tsx @@ -46,18 +46,43 @@ export const ScopeItem: FC = ({ ([name]) => !name.startsWith("__"), ); + if (isArray) { + return ( + + + {`${Math.max(index, 0)}. ${key}`} + + +
+ {properties.map((item, index) => ( + + ))} +
+
+
+ ); + } + return ( - - - {isArray && `${Math.max(index, 0)}.`} {key} - - +

{key}

+
{properties.map((item, index) => ( = ({ /> ))}
- - +
+ ); };