Closed vuquangpham closed 1 year ago
Name | Link |
---|---|
Latest commit | ba317f0f6acb0af6485adf4a3ddc8ccfd2de8dba |
Latest deploy log | https://app.netlify.com/sites/flickity/deploys/642e7b1d6bd0630008a84fcb |
Deploy Preview | https://deploy-preview-25--flickity.netlify.app/ |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Problem
Flickity Responsive doesn't hide custom arrows when the slider is not slideable while we already had this function.
Why
In the responsive-navigation function, we only hide the
customArrows
throughoptions.customArrows
, but this option is created inonMatched
event and we invoke this function insideonLoad
andonResize
events. So that we don't have anything change.And a small notice that the object between each event is different in memory. So that the customArrows option that we created in
onMatched
doesn't exist inonLoad
andonResize
events.Solution
Make the option
customArrows
to be part of theFlickity instance
, so that it will be accessed through all the events (onLoad
,onMatched
,onResize
).