File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/json-diagram/components Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { addPrefixChain } from '../../store/json-engine/helpers/json-parser.help
6
6
import { ArrayNodeData } from '../../store/json-engine/types/sea-node.type' ;
7
7
import { useNodeDetailViewStore } from '../../store/node-detail-view/node-detail-view.store' ;
8
8
import { isEmptyArray } from '../../utils/array.util' ;
9
+ import { encloseSquareBrackets } from '../../utils/string.util' ;
9
10
import { ROOT_NODE_NAME } from '../constants/root-node.constant' ;
10
11
import { ChainHandle } from './ChainHandle' ;
11
12
import { DefaultHandle } from './DefaultHandle' ;
@@ -30,7 +31,7 @@ const _ArrayNode = ({ id, data }: NodeProps<ArrayNodeData>) => {
30
31
{ ! isRootNode && < DefaultHandle id = { id } type = "target" /> }
31
32
< ChainHandle id = { addPrefixChain ( id ) } type = "target" />
32
33
33
- < Text css = { { margin : 'auto' } } > { isRootNode ? ROOT_NODE_NAME : arrayIndex } </ Text >
34
+ < Text css = { { margin : 'auto' } } > { isRootNode ? ROOT_NODE_NAME : encloseSquareBrackets ( arrayIndex ) } </ Text >
34
35
35
36
{ ! isEmptyArray ( items ) && < DefaultHandle id = { id } type = "source" /> }
36
37
You can’t perform that action at this time.
0 commit comments