americanexpress / react-albus

✨ React component library for building declarative multi-step flows.
Apache License 2.0
1.1k stars 89 forks source link

onNext is called on initialization #33

Open RareSecond opened 6 years ago

RareSecond commented 6 years ago

Wizard's onNext prop is called on the component's mount and not only when firing a next event.

zaguiini commented 5 years ago

It shouldn't!

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove no-issue-activity label or comment or this will be closed in 5 days.

RareSecond commented 4 years ago

Looks like a dead repo to me. Even the bot is months too late.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity.

wowtrxqn commented 4 years ago

Wizard's onNext prop is called on the component's mount and not only when firing a next event.

in my case, is a UI Component . u can get a ref from Button and trigger it Manually, even u can set css display: none to hidden UI ,

<WithWizard render={({ next, previous, step, steps }) => (

{steps.indexOf(step) > 0 && ( )}
            )}
        />

set function :() => buttonRef.current.props.onClick() to call

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity.

ryhinchey commented 3 years ago

onNext probably shouldn't be called on initial render. That'd solve for https://github.com/americanexpress/react-albus/issues/33.

ryhinchey commented 3 years ago

this will be solved in the v3 release. work is being done on the 3.x branch

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity.