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
|
||||
</Button>
|
||||
{isDirty && (
|
||||
<Button
|
||||
type="submit"
|
||||
name="save"
|
||||
value="save"
|
||||
variant="secondary"
|
||||
disabled={saveTaskMutation.isPending}
|
||||
>
|
||||
{saveTaskMutation.isPending && (
|
||||
<ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
|
||||
)}
|
||||
Save Changes
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
name="save"
|
||||
value="save"
|
||||
variant="secondary"
|
||||
disabled={saveTaskMutation.isPending || !isDirty}
|
||||
>
|
||||
{saveTaskMutation.isPending && (
|
||||
<ReloadIcon className="mr-2 h-4 w-4 animate-spin" />
|
||||
)}
|
||||
Save Changes
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
name="create"
|
||||
|
||||
Reference in New Issue
Block a user