Skip to content

Bug - Wizard - Clicking on WizardNavItem button causes submit #8875

@rottencandy

Description

@rottencandy

Describe the problem
When a Wizard is used inside a form, clicking on a nav item causes the form to submit.

How do you reproduce the problem?

  1. Go to https://patternfly-labs.github.io/formik-pf/?path=/story/formik-pf-formikwizard--basic-wizard (or create a form with WizardNavItem in it)
  2. Enter name and click next
  3. Try to go back to the previous step by clicking the first nav item

The console warns about the nav button not having a type:

Warning: You submitted a Formik form using a button with an unspecified `type` attribute.  Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.

Expected behavior
The first step should not submit immediately on clicking

Is this issue blocking you?
List the workaround if there is one.

Screenshots

What is your environment?
All browsers

What is your product and what release date are you targeting?

Any other information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions