Skip to content

Commit

Permalink
Merge pull request #49 from vadymshymko/fix-items-list-visibility
Browse files Browse the repository at this point in the history
Fix items list visibility
  • Loading branch information
vadymshymko authored Jun 13, 2022
2 parents 79d9915 + 4493b5b commit 26141d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-simply-carousel",
"version": "8.2.0",
"version": "8.2.1",
"description": "A simple, lightweight, fully controlled isomorphic (with SSR support) React.js carousel component. Touch enabled and responsive. With support for autoplay and infinity options. Fully customizable",
"files": [
"dist/"
Expand Down
9 changes: 7 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,15 @@ function ReactSimplyCarousel({
// eslint-disable-next-line no-nested-ternary
maxWidth: innerMaxWidth
? `${innerMaxWidth}px`
: !innerMaxWidth && showSlidesBeforeInit
: (!innerMaxWidth && showSlidesBeforeInit) ||
(windowWidth && !innerMaxWidth)
? undefined
: 0,
flex: !innerMaxWidth && showSlidesBeforeInit ? `1 0` : undefined,
flex:
(!innerMaxWidth && showSlidesBeforeInit) ||
(windowWidth && !innerMaxWidth)
? `1 0`
: undefined,
}}
ref={innerRef}
>
Expand Down

0 comments on commit 26141d8

Please sign in to comment.