Skip to content

Commit 7c44bac

Browse files
authored
Merge pull request #1543 from senithkay/fix-helper-variable-creation
Fix variable creation in helper pane
2 parents 7bd9070 + 110ade3 commit 7c44bac

File tree

1 file changed

+13
-21
lines changed
  • workspaces/ballerina/ballerina-visualizer/src/views/BI/HelperPaneNew/Views

1 file changed

+13
-21
lines changed

workspaces/ballerina/ballerina-visualizer/src/views/BI/HelperPaneNew/Views/Variables.tsx

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -245,26 +245,6 @@ export const Variables = (props: VariablesPageProps) => {
245245
}
246246

247247

248-
const getTypeDef = () => {
249-
return (
250-
{
251-
metadata: {
252-
label: "Type",
253-
description: "Type of the variable",
254-
},
255-
valueType: "TYPE",
256-
value: selectedType?.label,
257-
placeholder: "var",
258-
optional: false,
259-
editable: true,
260-
advanced: false,
261-
hidden: false,
262-
}
263-
)
264-
265-
}
266-
267-
268248
const selectedNode: FlowNode = {
269249
codedata: {
270250
node: 'VARIABLE',
@@ -289,7 +269,19 @@ export const Variables = (props: VariablesPageProps) => {
289269
advanced: false,
290270
hidden: false,
291271
},
292-
type: getTypeDef(),
272+
type: {
273+
metadata: {
274+
label: "Type",
275+
description: "Type of the variable",
276+
},
277+
types: [{ fieldType: "TYPE", selected: false }],
278+
value: selectedType?.label,
279+
placeholder: "var",
280+
optional: false,
281+
editable: true,
282+
advanced: false,
283+
hidden: false,
284+
},
293285
expression: {
294286
metadata: {
295287
label: "Expression",

0 commit comments

Comments
 (0)