Skip to content

Commit

Permalink
fix(ui): disable node config input if using flow override
Browse files Browse the repository at this point in the history
  • Loading branch information
reddigari committed May 2, 2020
1 parent cd809d5 commit 4fbf27d
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 4fbf27d

Please sign in to comment.