fix submit button not being disabled
This commit is contained in:
parent
236dcae13b
commit
87e86526f8
|
@ -17,14 +17,14 @@ import { useLazyQuery } from '@apollo/client'
|
||||||
import { USER_SEARCH } from '../fragments/users'
|
import { USER_SEARCH } from '../fragments/users'
|
||||||
|
|
||||||
export function SubmitButton ({
|
export function SubmitButton ({
|
||||||
children, variant, value, onClick, ...props
|
children, variant, value, onClick, disabled, ...props
|
||||||
}) {
|
}) {
|
||||||
const { isSubmitting, setFieldValue } = useFormikContext()
|
const { isSubmitting, setFieldValue } = useFormikContext()
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant={variant || 'main'}
|
variant={variant || 'main'}
|
||||||
type='submit'
|
type='submit'
|
||||||
disabled={isSubmitting}
|
disabled={disabled || isSubmitting}
|
||||||
onClick={value
|
onClick={value
|
||||||
? e => {
|
? e => {
|
||||||
setFieldValue('submit', value)
|
setFieldValue('submit', value)
|
||||||
|
|
Loading…
Reference in New Issue