Ionic 4.beta3 slidebox lockSwipes() is not working
See original GitHub issueOn doing swipe lock I am getting an error.
updateSlideBox() {
var slideController = document.querySelector(".slidernow");
slideController.componentOnReady().then(function () {
slideController.update();
slideController. lockSwipes();
});
}
jepizrms.js:5 Uncaught (in promise) TypeError: this.swiper.unlockSwipeToNext is not a function
at k.lockSwipeToNext (jepizrms.js:5)
at eval (Airport.js?3dca:146)
I can tell slideTo is working fine but locking swipes of slides is throwing error.
Ionic version:
<script src="https://unpkg.com/@ionic/core@4.0.0-beta.3/dist/ionic.js"></script>Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ionic slider - lockSwipes(true) disables initialSlide and ...
Yes, by looking at the source code for lockSwipes() , it seems like the functions slideNext and slidePrev gets 'locked':
Read more >Ionic slider - lockSwipes(true) disables initialSlide and ...
hi I'm using ionic slider to display todo lists and I want to disable the swipe guestures since my list items have them....
Read more >Ion-slides 禁用滑动ionic 4 - 免费编程教程
Ionic 4.beta3 滑动框lockSwipes() 不起作用· 问题#15310 ... 一年多前,我写了一篇文章(“Ionic Example: ion-slide-box”),演示了如何在Ionic 1 中 ...
Read more >Ionic - JavaScript Slide Box - Tutorialspoint
You just need to add ion-slide-box as a container and ion-slide with box class inside that container. We will add height and border...
Read more >Ionic Example: ion-slide-box - Raymond Camden
$apply() solution you see above. That made it work perfectly. All in all, a simple demo, but I hope this is useful for...
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 Free
Top 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
LockSwipes() isn’t working but I found a workaround.
You have to disable swiping from the ‘Sliders’ options. There are a couple of ways of doing it (check Swiper Docs) but this is how I did it:
HTML:
TS:
With this code simply call the function LockSwipes and you are ready to go. 😃
This is issue should be resolved in beta.17. If I am wrong, please write here!