Slides indexes not re-counting after filtering. Suggestion / solution
See original GitHub issueHello!
I doing custom slides preview for prev/next slides and found, that after filtering script not re-counting indexes for slides (I printed current and next indexes on “beforeChange” and found, that they are different with indexes from “data-slick-index”) So my fix was in slick refreshing on ‘reInit’ (gallery.slick(‘refresh’))
Maybe this solution could help someone or you will add refresh in re-init.
[ paste your jsfiddle link here ]
use this jsfiddle to reproduce your bug: http://jsfiddle.net/simeydotme/fmo50w7n/ we will likely close your issue without it.
Steps to reproduce the problem
- Filter slides
- check console.log indexes
- check real indexes from data-slick-index
What is the expected behaviour?
same indexes for right dom manipulating
What is observed behaviour?
different indexes printed
More Details
- Chrome 52.0.2743.116 (64-bit)
- Version: 1.6.0
- who know
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:9
Top Results From Across the Web
Tune nonclustered indexes with missing index suggestions
Unique and filtered indexes aren't suggested. Key columns are suggested, but the suggestion doesn't specify an order for those columns.
Read more >Page Indexing report - Search Console Help - Google Support
The top-level summary page in the report shows a graph and count of your indexed and non-indexed (but requested) pages, as well as...
Read more >Product Filter by WooBeWoo - Plugins - WordPress.org
Recount the products by selected filters and display the exact number of products matching the filter results. Fully responsive. The filter looks and...
Read more >Behind the Magnifying Glass: How Search Works - Splunk .conf
A logical Index is made up of many indexes/TSIDX files. – This is how we search for your data ê More...
Read more >Building the best INDEX for a given SELECT - MariaDB
Cookbook for Creating Indexes. ... Normally a LIMIT cannot be applied until after lots of rows are gathered and ... (JSON makes it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hit that issue while using Slick as a dynamic slider for some purpose. adding&removing slides (complex HTML elements) got Slick to lose very fast the track of slides to solve it I’m reindexing all relevant slides after a removal using this simple code
@Davidkulpe your solution seems like what I’ve been looking for/wracking my brain over. Here’s what I’m dealing with. I’d love your help on where to place your code.
I have something setup on a product detail page where there is a Slick slider for the large product images (‘.slider-for’ and then a Slick slider for thumbnail images (‘.slider-nav’)that act as the navigation for the main image. On the slider-nav Slick, I have asNavFor: ‘.slider-for’ and focusOnSelect: true, which both seem to cause issues with the indexing after slickFilter is set. So a customer would choose a product color, and the main and thumbs would change to only be the ones with the corresponding color class. As others have noted, after clicking around, Slick gets confused with the indexing and doesn’t highlight the selected thumbnail and/or doesn’t show the corresponding large product image.
I’m setting slickUnfilter on both the main image slider and the thumbnail slider, then setting slickFilter, ‘.color-class’ to show only images of the selected color. Can you give your thoughts on where I’d place your code/something similar to your code to reset the index on both of those sliders? Any insight would be appreciated. Thanks!