{"action":"closed","issue":{"url":"https://api.github.com/repos/maxmarinich/react-alice-carousel/issues/36","repository_url":"https://api.github.com/repos/maxmarinich/react-alice-carousel","labels_url":"https://api.github.com/repos/maxmarinich/react-alice-carousel/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/maxmarinich/react-alice-carousel/issues/36/comments","events_url":"https://api.github.com/repos/maxmarinich/react-alice-carousel/issues/36/events","html_url":"https://github.com/maxmarinich/react-alice-carousel/issues/36","id":365701570,"node_id":"MDU6SXNzdWUzNjU3MDE1NzA=","number":36,"title":"Feature request: slideNext/slidePrev with index ","user":{"login":"sos0","id":1973082,"node_id":"MDQ6VXNlcjE5NzMwODI=","avatar_url":"https://avatars2.githubusercontent.com/u/1973082?v=4","gravatar_id":"","url":"https://api.github.com/users/sos0","html_url":"https://github.com/sos0","followers_url":"https://api.github.com/users/sos0/followers","following_url":"https://api.github.com/users/sos0/following{/other_user}","gists_url":"https://api.github.com/users/sos0/gists{/gist_id}","starred_url":"https://api.github.com/users/sos0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sos0/subscriptions","organizations_url":"https://api.github.com/users/sos0/orgs","repos_url":"https://api.github.com/users/sos0/repos","events_url":"https://api.github.com/users/sos0/events{/privacy}","received_events_url":"https://api.github.com/users/sos0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-02T01:13:26Z","updated_at":"2018-12-19T17:42:20Z","closed_at":"2018-12-19T17:42:20Z","author_association":"NONE","body":"I would love to be able to call something like: `this.Carousel._slidePrevPage()` or `this.Carousel._slidePage(count)` to slide the entire # of slides designated for the `responsive` setting instead of navigating one slide at a time. Would this be a doable and/or reasonable feature to request?\r\n\r\nMy current solution was to write a function like this:\r\n```js\r\n  pageHandler = (slideCount) => {\r\n    // If the current number of slide items are just 1, do not divide by 2. If current number is > 1, slide page by # items/2.\r\n    let responsiveSlideCount = slideCount > 1 ? slideCount/2 : 1;\r\n    // Alternative version:\r\n    // let responsiveSlideCount = slideCount > 5 ? slideCount/2 : slideCount;\r\n    let itemIndex = this.Carousel.state.currentIndex + responsiveSlideCount;\r\n    if (itemIndex < 0) {\r\n      itemIndex = 0;\r\n    }\r\n\r\n    this.Carousel._slideToItem(itemIndex);\r\n  }\r\n```\r\n```jsx\r\n<button className=\"slide-button-back\" onClick={() => this.pageHandler(this.Carousel.state.items * -1)}>\r\n  <i className=\"fa fa-caret-left\" />\r\n</button>\r\n<button className=\"slide-button-next\" onClick={() => this.pageHandler(this.Carousel.state.items)}>\r\n  <i className=\"fa fa-caret-right\" />\r\n</button>\r\n```\r\n"}}
{"actor":{"display_login":"maxmarinich"}}