Skip to content

Commit

Permalink
Impl [Wizard] jumpToStep function to action button
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan7empest committed Feb 12, 2024
1 parent 3e49faa commit 079c13e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/Wizard/Wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Wizard = ({
const allStepsAreEnabled = visibleSteps.every((step) => !step.disabled)

if (getActions) {
const actions = getActions({ allStepsAreEnabled, goToFirstInvalidStep })
const actions = getActions({ allStepsAreEnabled, jumpToStep, goToFirstInvalidStep })
const mainActions = actions.map((action) => <Button {...action} />)
actionsList.push(...mainActions)
}
Expand Down
3 changes: 1 addition & 2 deletions src/lib/elements/FormActionButton/FormActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ const FormActionButton = React.forwardRef(
{!hidden && (
<div className="form-table__row form-table__action-row no-hover">
<button
data-testid={`${fieldsPath}-add-btn`}
data-testid={id ? id : `${fieldsPath}-add-btn`}
onClick={(event) => onClick(event, fields, fieldsPath)}
disabled={disabled}
data-testid={id}
>
<Plus />
{label}
Expand Down

0 comments on commit 079c13e

Please sign in to comment.