Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Tauffer-Consulting/domino in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
vinicvaz committed Feb 19, 2024
2 parents 8e4b08a + fe60912 commit d18494c
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ const InputElement: React.FC<Props> = React.memo(
return (
<EnumInput
schema={schema as EnumProperty}
itemKey={itemKey}
itemKey={isItemArray ? `${itemKey}.value` : itemKey}
definitions={definitions as Definitions}
/>
);
} else if (isNumberType(schema, optionalType)) {
return (
<NumberInput<WorkflowPieceData>
name={itemKey}
name={isItemArray ? `${itemKey}.value` : itemKey}
type={optionalType === "integer" ? "int" : "float"}
label={schema.title}
defaultValue={
Expand All @@ -99,12 +99,15 @@ const InputElement: React.FC<Props> = React.memo(
);
} else if (isBooleanType(schema)) {
return (
<CheckboxInput<WorkflowPieceData> name={itemKey} label={schema.title} />
<CheckboxInput<WorkflowPieceData>
name={isItemArray ? `${itemKey}.value` : itemKey}
label={schema.title}
/>
);
} else if (isDateOrTimeType(schema, optionalType)) {
return (
<DatetimeInput<WorkflowPieceData>
name={itemKey}
name={isItemArray ? `${itemKey}.value` : itemKey}
label={schema.title}
type={(schema as StringProperty).format}
/>
Expand All @@ -113,7 +116,7 @@ const InputElement: React.FC<Props> = React.memo(
const language = extractCodeEditorLanguage(schema as StringProperty);
return (
<CodeEditorInput<WorkflowPieceData>
name={itemKey}
name={isItemArray ? `${itemKey}.value` : itemKey}
language={language}
placeholder={`Enter your ${language} code here.`}
/>
Expand All @@ -122,15 +125,15 @@ const InputElement: React.FC<Props> = React.memo(
return (
<TextAreaInput<WorkflowPieceData>
variant="outlined"
name={itemKey}
name={isItemArray ? `${itemKey}.value` : itemKey}
label={schema.title}
/>
);
} else if (isStringType(schema, optionalType)) {
return (
<TextInput<WorkflowPieceData>
variant="outlined"
name={itemKey}
name={isItemArray ? `${itemKey}.value` : itemKey}
label={schema.title}
/>
);
Expand Down

0 comments on commit d18494c

Please sign in to comment.