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"}
|
type={submit.onClick ? "button" : "submit"}
|
||||||
onClick={submit.onClick}
|
onClick={submit.onClick}
|
||||||
loading={submit.loading}
|
loading={submit.loading}
|
||||||
|
disabled={submit.disabled}
|
||||||
>
|
>
|
||||||
{submit.icon && submit.icon}
|
{submit.icon && submit.icon}
|
||||||
{submit.label}
|
{submit.label}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ export default function FlowSettingsModal({
|
||||||
<BaseModal.Footer
|
<BaseModal.Footer
|
||||||
submit={{
|
submit={{
|
||||||
label: "Save",
|
label: "Save",
|
||||||
disabled: nameLists.includes(name) && name !== currentFlow!.name,
|
disabled: nameLists.includes(name) || name === currentFlow!.name,
|
||||||
dataTestId: "save-flow-settings",
|
dataTestId: "save-flow-settings",
|
||||||
loading: isSaving,
|
loading: isSaving,
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue