Skip to content

Commit 183b7c8

Browse files
committed
SdgSoft:
Temporarly solution so the nodes can be used and will be enhanced in future with complex types - Restrict ArrayNode to use only string, number or boolean for now - Restrict ObjectNode when choose array that items onnly use string, number or boolean for now
1 parent 039b4e7 commit 183b7c8

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

  • apps/chaingraph-frontend/src/components/flow/nodes/ChaingraphNode/ports/ObjectPort/components
  • packages/chaingraph-nodes/src/nodes/basic-values

apps/chaingraph-frontend/src/components/flow/nodes/ChaingraphNode/ports/ObjectPort/components/AddPropPopover.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ const typeConfigMap: Record<PortType, IPortConfig> = {
8989
defaultValue: [],
9090
ui: {
9191
hideEditor: false,
92+
allowedTypes: ['string', 'number', 'boolean']
9293
},
9394
isMutable: true,
9495
},

packages/chaingraph-nodes/src/nodes/basic-values/array.node.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class ArrayNode extends BaseNode {
2929
ui: {
3030
hideEditor: false,
3131
addItemFormHidden: false,
32+
allowedTypes: ['string', 'number', 'boolean']
3233
},
3334
})
3435
array: any[] = []

0 commit comments

Comments
 (0)