Commit 7ff49822 authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: allow workflow submission when form page pristine

parent 1b47ea7f
Pipeline #178358 passed with stage
in 5 minutes and 49 seconds
......@@ -188,6 +188,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
>
{pages[state.page]}
<div className="flex items-center justify-end space-x-6">
<pre>{JSON.stringify(pristine)}</pre>
<Button onPress={onCancel} variant="link">
Cancel
</Button>
......@@ -202,7 +203,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form.change('draft', true)
}}
isDisabled={
pristine || invalid || submitting || create.isLoading
/* FIXME: handle `pristine` for multi-step form || */
invalid || submitting || create.isLoading
}
variant="link"
>
......@@ -214,7 +216,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form.change('draft', undefined)
}}
isDisabled={
pristine || invalid || submitting || create.isLoading
/* FIXME: pristine || */
invalid || submitting || create.isLoading
}
>
{isAllowedToPublish ? 'Publish' : 'Submit'}
......
......@@ -205,7 +205,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form.change('draft', true)
}}
isDisabled={
pristine || invalid || submitting || create.isLoading
/* FIXME: handle `pristine` for multi-step form || */
invalid || submitting || create.isLoading
}
variant="link"
>
......@@ -217,7 +218,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form.change('draft', undefined)
}}
isDisabled={
pristine || invalid || submitting || create.isLoading
/* FIXME: pristine || */
invalid || submitting || create.isLoading
}
>
{isAllowedToPublish ? 'Publish' : 'Submit'}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment