gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.88k stars 529 forks source link

floaterProps.callback never gets called with action=close for react-joyride@next #443

Closed gitowiec closed 5 years ago

gitowiec commented 6 years ago

Expected behavior

Running this code

const floaterProps = {
  callback: (action: string, props: object) => {
    console.log(action, props);
  },
};
<Joyride
      steps={this.props.steps}
      floaterProps={floaterProps}
      run={run}
      {...joyrideDefaultProps}
/>

I expect to read in browser console "close" when Step is closing (by skip or close X icon)

Actual behavior

Only "open" events are logged

Steps to reproduce the problem

It is enough what is above.

React version

16.4

React-Joyride version

@next

Browser name and version

Chromium Version 70.0.3538.77 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)

Error stack (if available)

n/a

gilbarbara commented 5 years ago

Why are you using the Floater callback instead of the Joyride's callback?