Skip to content

Commit

Permalink
Merge branch 'release_24.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Aug 30, 2024
2 parents 9b010a0 + b10e8f8 commit d1fc599
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions client/src/components/Workflow/Editor/Forms/FormTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export default {
return !!this.configForm?.id;
},
inputs() {
// TODO: Refactor
// This code contains a computed side-effect and prop mutation.
// Both should be refactored
const inputs = this.configForm.inputs;
Utils.deepEach(inputs, (input) => {
if (input.type) {
Expand All @@ -150,10 +153,14 @@ export default {
input.info = `Data input '${input.name}' (${extensions})`;
input.value = { __class__: "RuntimeValue" };
} else {
input.connectable = ["rules"].indexOf(input.type) == -1;
input.collapsible_value = {
__class__: "RuntimeValue",
};
const isRules = input.type === "rules";
input.connectable = !isRules;
input.collapsible_value = isRules
? undefined
: {
__class__: "RuntimeValue",
};
input.is_workflow =
(input.options && input.options.length === 0) ||
["integer", "float"].indexOf(input.type) != -1;
Expand Down

0 comments on commit d1fc599

Please sign in to comment.