-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add .slick-active class on slides that are visible #764
Comments
hey @akiran. did you have any chance to take a look at this proposal? Would love to get your feedback. Thanks, Roland |
You should be able to do this in your component using |
@brownsmith thanks for the fast reply. You mean the
So there is no hint on the current slide included. |
I'll try to hook into the |
Okay. this seems to be an option but just as long as there are no responsive settings set up. As soon as there are responsive settings I end up doing the same match media calculations outside of the Slider component which adds redundant complexity. |
This is true, we're having to do the same thing twice depending on the number of slides at both of our breakpoints. It's overkill, but it solved our problem. Perhaps it could be passed out to a helper function with the number of slides as an argument? It's a problem I'll have to fix myself at some point. |
Also recalculating the active slide in the main component causes the slides to rerender and therefore it breaks the animation. Only option I currently see is to share it with |
This is still an issue. My workaround was setting slidesToScroll option one lower then the slidesToShow option. |
This has been fixed way back, please make sure you're using the latest version. |
The same issue version 0.23.1 https://codesandbox.io/s/ymn9kr8xjz var settings = {
slidesToShow: 2,
slidesToScroll: 2
}; |
This has not been fixed, since there is no logic to handle this case: https://github.com/akiran/react-slick/blob/master/src/track.js#L32-L34 |
@akiran Do you plan on fixing this issue any time soon? It would be greatly appreciated |
@akiran same issue on v0.25.2 !! |
akiran#764 I made the solution report as a chris-tmakers (My business account), it will be solve active and inactive items on screen.
How can I set my active style on the custom paging? or how can I modify slick-active class.? |
When reaching the end of a finite slider with multiple slides, not all of them do get the
.slick-active
class.Here's a little snapshot to describe the issue.
The slider is set up as following:
Initial - first 4 slides visible
After click on next arrow (actual behavoir) - last 4 slides visible
After click on next arrow (expeted behavoir) - last 4 slides visible
Is this an expected bahvoir? If not, I've a fix ready and I'm happy to file a pull request.
Best
Roland
The text was updated successfully, but these errors were encountered: