Skip to content

validation does not disable button when manually controlling disable/loading state #232

Description

@emdrayallday

For cases when you want to manually trigger a loading or disabled state, it will override the form state of

isValid / isValidating / isSubmitting for disabled
isSubmitting for loading

How to reproduce

Implementation of FormSubmit component

<FormSubmit
    disabled={customDisable}
    loading={customLoading}
/>

Brewkit FormSubmit component

The rest operator is overriding the disabled/loading state respectively when it should be included with the form state

<Button
    disabled={!formState.isValid || formState.isSubmitting || formState.isValidating}
    loading={formState.isSubmitting}
    ref={ref}
    type="submit"
    {...otherProps}
>
    {children}
</Button>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions