-
Notifications
You must be signed in to change notification settings - Fork 602
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
initialIndex and groupCells #818
Comments
Because the cells are grouped initial index is now counting groups not cells, so there is no index 7 any more because there are only 4 groups. If you want the 7th cell then you can set initial index to 2 (to get the 3rd group). You could figure it our programatically if you know how many cells are in each group. No idea if this is intended behaviour or not. |
@AdamJaggard thanks, in my requirement though it should show as first slide (not just on the screen). |
@runnickrun If you want to select a group slide by cell index or cell selector string, you can do so with |
@desandro Yeah, I tried that, but that still select group, so e.g. if item is 3rd in the group, it will be 3rd on the screen. What I'm trying to achieve is to show the selected item as first. Example of this could be seen here: upon clicking on the previous arrow, remaining slides are shown Hopefully that makes sense. I assume it means to kind of “split” the group and understand that it might not be possible by default, but would be great if you could provide some kind of direction. |
Yeah, that is how |
add selectInitialIndex ✅ initialIndex tests
In v2.2.0, you can now set initialIndex: '.is-initial-select' <div class="carousel-cell">...</div>
<div class="carousel-cell">...</div>
<div class="carousel-cell is-initial-select">...</div> If you run into a problem with this feature, please open a new issue. Thank you for your input 🌈🐻 |
I'm trying to set initialIndex on a carousel where I use groupCells but apparently nothing happens.
Any workaround to achieve the functionality?
Test case: https://codepen.io/runnick/pen/GXgbXr
The text was updated successfully, but these errors were encountered: