yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

Responsive settings not being applied #154

Closed samroberts707 closed 7 months ago

samroberts707 commented 7 months ago

I'm trying to change the amount of cells grouped depending on the screensize, this is possible within regular JS Flickity but it appears that the responsive settings aren't being applied in this React component.

Here is a codesandbox link to show the issue:

https://codesandbox.io/p/sandbox/react-flickity-forked-xdpk9x

yaodingyd commented 7 months ago

you were using a older version of react (v16) & react-flickity-component(v3). Update to latest (react v18, react-flickity-componet v4)cshould make it work https://codesandbox.io/p/sandbox/react-flickity-forked-xyjqxg

samroberts707 commented 7 months ago

Sorry would you be able to double check this? Updating the packages hasn't seemed to solve the issue. The slides are still split in to groups of 3 rather than changing to single slide groups on smaller screen size.

yaodingyd commented 7 months ago

you are right, my example is not working. Although I have trouble find this responsive option on flickity site, can you show me a working example?

samroberts707 commented 7 months ago

You're 100% correct. This is actually an external add on and not a native option. I'll close off the issue now.