akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.72k stars 2.1k forks source link

Media Query not firing when narrowing down if document width equals to the largest breakpoint #1478

Open trkaplan opened 5 years ago

trkaplan commented 5 years ago

Media Query not firing when narrowing down if document width equals to the largest breakpoint.

Sandbox: https://codesandbox.io/s/oqvyx99o4z

Solution: I've checked previous commits and saw a commit related to this issue. Same change must be applied to the full screen media query by incrementing minWidth value by 1.

slick 2019-01-05 23_48_51

If current width is equal to largest breakpoint, narrowing down the page up to closest breakpoint does not update slide numbers.

Expected Behavior After narrowing down up to closest breakpoint, there must be 3 slides

Current Behavior It shows 4 in this example:

Steps to Reproduce

Context

P.S. Issue reported to me by @hamzaerbay

ralyodio commented 5 years ago

Is there anyway to make the child boxes fixed width but the number of cards to show as a responsive number? All the examples I've seen the cards themselves change widths. I don't want that.

hamzaerbay commented 5 years ago

It does similarly, even you use a fixed-width card.