Fix: Block user from saving flows with the same name
This commit is contained in:
parent
0198342767
commit
af0c35d685
2 changed files with 2 additions and 1 deletions
|
|
@ -105,6 +105,7 @@ const Footer: React.FC<{
|
|||
type={submit.onClick ? "button" : "submit"}
|
||||
onClick={submit.onClick}
|
||||
loading={submit.loading}
|
||||
disabled={submit.disabled}
|
||||
>
|
||||
{submit.icon && submit.icon}
|
||||
{submit.label}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export default function FlowSettingsModal({
|
|||
<BaseModal.Footer
|
||||
submit={{
|
||||
label: "Save",
|
||||
disabled: nameLists.includes(name) && name !== currentFlow!.name,
|
||||
disabled: nameLists.includes(name) || name === currentFlow!.name,
|
||||
dataTestId: "save-flow-settings",
|
||||
loading: isSaving,
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue