{"action":"created","issue":{"url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/63","repository_url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel","labels_url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/63/comments","events_url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/63/events","html_url":"https://github.com/YIZHUANG/react-multi-carousel/issues/63","id":500707975,"node_id":"MDU6SXNzdWU1MDA3MDc5NzU=","number":63,"title":"Disable infinite (and centerMode) when totalItems < slidesToShow","user":{"login":"abhinavdalal-iconnect","id":35057308,"node_id":"MDQ6VXNlcjM1MDU3MzA4","avatar_url":"https://avatars0.githubusercontent.com/u/35057308?v=4","gravatar_id":"","url":"https://api.github.com/users/abhinavdalal-iconnect","html_url":"https://github.com/abhinavdalal-iconnect","followers_url":"https://api.github.com/users/abhinavdalal-iconnect/followers","following_url":"https://api.github.com/users/abhinavdalal-iconnect/following{/other_user}","gists_url":"https://api.github.com/users/abhinavdalal-iconnect/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinavdalal-iconnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinavdalal-iconnect/subscriptions","organizations_url":"https://api.github.com/users/abhinavdalal-iconnect/orgs","repos_url":"https://api.github.com/users/abhinavdalal-iconnect/repos","events_url":"https://api.github.com/users/abhinavdalal-iconnect/events{/privacy}","received_events_url":"https://api.github.com/users/abhinavdalal-iconnect/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-01T07:09:37Z","updated_at":"2019-10-01T07:45:40Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nwhen the totalItems are less than slidesToShow in infinite mode; carousel goes blank\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. clone https://github.com/abhinavdalal/matrimony-demo\r\n2. git checkout 'demo_infinite_mode_error'\r\n3. `npm i` and then `npm start`\r\n4. login as shaadi/123\r\n5. select 6 on dropdown (everything works as expected)\r\n6. select 4 on dropdown -> ERROR (carousel goes blank after some flashes)\r\n\r\n**Expected behavior**\r\ndisable the infinite (and centerMode) when totalItems < slidesToShow. IMO the concept of infinite should not apply if all items to be displayed are visible on the screen already. \r\n\r\nNote for totalItems = slidesToShow i think infinite mode still makes sense specially with the centerMode as we would have an extra half and half on either side of the carousel ; but if ( totalItems < slidesToShow ) then just disable infinite mode makes sense IMO even with centerMode.\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: [ubuntu]\r\n - Browser [firefox]\r\n - Version [69]\r\n\r\n**Smartphone (please complete the following information):**\r\nsame issues on small screens seen with devtools"},"comment":{"url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/comments/536913154","html_url":"https://github.com/YIZHUANG/react-multi-carousel/issues/63#issuecomment-536913154","issue_url":"https://api.github.com/repos/YIZHUANG/react-multi-carousel/issues/63","id":536913154,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNjkxMzE1NA==","user":{"login":"YIZHUANG","id":28932103,"node_id":"MDQ6VXNlcjI4OTMyMTAz","avatar_url":"https://avatars0.githubusercontent.com/u/28932103?v=4","gravatar_id":"","url":"https://api.github.com/users/YIZHUANG","html_url":"https://github.com/YIZHUANG","followers_url":"https://api.github.com/users/YIZHUANG/followers","following_url":"https://api.github.com/users/YIZHUANG/following{/other_user}","gists_url":"https://api.github.com/users/YIZHUANG/gists{/gist_id}","starred_url":"https://api.github.com/users/YIZHUANG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YIZHUANG/subscriptions","organizations_url":"https://api.github.com/users/YIZHUANG/orgs","repos_url":"https://api.github.com/users/YIZHUANG/repos","events_url":"https://api.github.com/users/YIZHUANG/events{/privacy}","received_events_url":"https://api.github.com/users/YIZHUANG/received_events","type":"User","site_admin":false},"created_at":"2019-10-01T07:45:40Z","updated_at":"2019-10-01T07:45:40Z","author_association":"OWNER","body":"Yeah, please do. Thank you! "}}
{"actor":{"display_login":"YIZHUANG"}}