Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you pass children and containerelement to onChange and onChangeEnd to make the latter more useful? #43

Open
WhereJuly opened this issue Dec 18, 2018 · 1 comment

Comments

@WhereJuly
Copy link

There is not much one can do within onChange and onChangeEnd callbacks with only next and current indexes provided.

Just for my case I need to dynamically change the style attributes on the slides in addition to prop management the simple-slider provides. It is again just a tiny fix allowing for much wider customization.

This would only require the following change starting line 145:

        if (onChange) {
          onChange(actualIndex, nextIndex(), containerElem, imgs);
        }

And the similar for onChangeEnd on line 210.

@ruyadorno
Copy link
Owner

👍 sounds like a great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants