Show save changes button as disabled when not dirty instead of not sh… (#467)
This commit is contained in:
@@ -480,21 +480,18 @@ function SavedTaskForm({ initialValues }: Props) {
|
|||||||
>
|
>
|
||||||
Copy cURL
|
Copy cURL
|
||||||
</Button>
|
</Button>
|
||||||
{isDirty && (
|
<Button
|
||||||
<Button
|
type="submit"
|
||||||
type="submit"
|
name="save"
|
||||||
name="save"
|
value="save"
|
||||||
value="save"
|
variant="secondary"
|
||||||
variant="secondary"
|
disabled={saveTaskMutation.isPending || !isDirty}
|
||||||
disabled={saveTaskMutation.isPending}
|
>
|
||||||
>
|
{saveTaskMutation.isPending && (
|
||||||
{saveTaskMutation.isPending && (
|
<ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
|
||||||
<ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
|
)}
|
||||||
)}
|
Save Changes
|
||||||
Save Changes
|
</Button>
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
name="create"
|
name="create"
|
||||||
|
|||||||
Reference in New Issue
Block a user