Can't prevent change of current slide
See original GitHub issueI’d love to be able to prevent a user going to a certain steps until some conditions are met.
It’s great that there are so many events but we need to be able to call e.preventDefault()
or something like that. Or even if in a beforeChange
callback you could overwrite the nextSlide
slide passed in (for example: nextSlide = currentSlide
). The closest I got was using slickGoTo
inside a setPosition
callback but then I realised this was causing an infinite loop and would require me to manage some slick state stuff outside of slick.
Issue Analytics
- State:
- Created 9 years ago
- Comments:26 (3 by maintainers)
Top Results From Across the Web
Help prevent changes to a final version of a file
In your Word, PowerPoint, or Excel file, click File >Info > Protect (Document, Presentation, or Workbook) > Mark as Final. The following screen...
Read more >Remove or change the current theme - Microsoft Support
To change the theme for your presentation, click the Design tab. In the Themes group, click the theme you want to apply. You...
Read more >Video: Edit slide timings - Microsoft Support
Training: If you've recorded slide timings and find that there are a couple of timings you want to tweak, you don't need to...
Read more >Screen sharing a PowerPoint presentation - Zoom Support
To stop viewing the screen shared, click the up arrow . Switch back to Powerpoint and click the Slide Show tab. Begin the...
Read more >Present slides - Computer - Google Docs Editors Help
Tip: If you want to change your presentation or timing, you'll need to copy a new link. Stop publishing. Open a presentation in...
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
think about this logically…
Why would you want to prevent the slideChange when you’ve already triggered the slideChange? - it doesn’t make sense.
If you want to prevent changing slides, then run the logic before you change slides and change the carousel options to disallow interaction… do not allow user to change slides and then stop half way through.
So wait, you want slick to have a disabled state? I’m not sure I have anything set up for that, because I’ve never intentionally wanted to disable its functionality.
If a client came to me wanting this, I’d probably layer a div on top of slick that intercepted and killed events until my condition to enable slick was met. Not a core solution, but likely the simplest.