Skip to content

Commit

Permalink
Merge pull request #2720 from asashour/flow
Browse files Browse the repository at this point in the history
fix(studio): rename only when flow name is changed
  • Loading branch information
EFF committed Dec 17, 2019
2 parents 1ed9fcc + bcaedf6 commit 459c844
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Expand Up @@ -85,7 +85,13 @@ const FlowNameModal: FC<Props> = props => {

<div className={Classes.DIALOG_FOOTER}>
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
<Button type="submit" id="btn-submit" text="Submit" onClick={submit} disabled={!name || alreadyExists} />
<Button
type="submit"
id="btn-submit"
text="Submit"
onClick={submit}
disabled={!name || isIdentical || alreadyExists}
/>
</div>
</div>
</form>
Expand Down
Expand Up @@ -81,20 +81,20 @@ export default class FlowsList extends Component<Props, State> {
text="Rename"
onClick={() => this.props.renameFlow(node.nodeData.name)}
/>
<MenuItem
id="btn-delete"
disabled={lockedFlows.includes(node.nodeData.name) || !this.props.canDelete || this.props.readOnly}
icon="delete"
text="Delete"
onClick={() => this.handleDelete(node.nodeData)}
/>
<MenuItem
id="btn-duplicate"
disabled={this.props.readOnly}
icon="duplicate"
text="Duplicate"
onClick={() => this.props.duplicateFlow(node.nodeData.name)}
/>
<MenuItem
id="btn-delete"
disabled={lockedFlows.includes(node.nodeData.name) || !this.props.canDelete || this.props.readOnly}
icon="delete"
text="Delete"
onClick={() => this.handleDelete(node.nodeData)}
/>
</Menu>,
{ left: e.clientX, top: e.clientY }
)
Expand Down

0 comments on commit 459c844

Please sign in to comment.