Skip to content

Commit

Permalink
Merge pull request #81 from matthew-t-smith/dev/samir
Browse files Browse the repository at this point in the history
Disable node config input if using flow override
  • Loading branch information
reddigari authored May 3, 2020
2 parents cd809d5 + 4fbf27d commit d43b0ae
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions front-end/src/components/CustomNode/NodeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,15 @@ function SimpleInput(props) {
},
[value, keyName, onChange, type]);

if (props.type === "textarea") {
return (
<Form.Control as="textarea" rows="7" name={props.keyName}
defaultValue={props.value}
onChange={handleChange} />
)

} else {
return (
<Form.Control type={props.type} name={props.keyName}
defaultValue={props.value}
onChange={handleChange} />
)
}
const extraProps = props.type === "textarea"
? {as: "textarea", rows: props.rows || 7}
: {type: props.type};
return (
<Form.Control {...extraProps} name={props.keyName}
disabled={props.disabled}
defaultValue={props.value}
onChange={handleChange} />
)
}


Expand Down

0 comments on commit d43b0ae

Please sign in to comment.