{"action":"closed","issue":{"url":"https://api.github.com/repos/leecade/react-native-swiper/issues/530","repository_url":"https://api.github.com/repos/leecade/react-native-swiper","labels_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/530/comments","events_url":"https://api.github.com/repos/leecade/react-native-swiper/issues/530/events","html_url":"https://github.com/leecade/react-native-swiper/issues/530","id":252311204,"number":530,"title":"Cannot Disable Control Buttons","user":{"login":"SSTPIERRE2","id":19779234,"avatar_url":"https://avatars2.githubusercontent.com/u/19779234?v=4","gravatar_id":"","url":"https://api.github.com/users/SSTPIERRE2","html_url":"https://github.com/SSTPIERRE2","followers_url":"https://api.github.com/users/SSTPIERRE2/followers","following_url":"https://api.github.com/users/SSTPIERRE2/following{/other_user}","gists_url":"https://api.github.com/users/SSTPIERRE2/gists{/gist_id}","starred_url":"https://api.github.com/users/SSTPIERRE2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SSTPIERRE2/subscriptions","organizations_url":"https://api.github.com/users/SSTPIERRE2/orgs","repos_url":"https://api.github.com/users/SSTPIERRE2/repos","events_url":"https://api.github.com/users/SSTPIERRE2/events{/privacy}","received_events_url":"https://api.github.com/users/SSTPIERRE2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-08-23T14:50:50Z","updated_at":"2017-09-08T16:23:09Z","closed_at":"2017-09-08T16:23:09Z","author_association":"CONTRIBUTOR","body":"### Which OS ?\r\n\r\niOS\r\n\r\n### Version\r\nWhich versions are you using:\r\n\r\n- react-native-swiper v? ^1.5.10\r\n- react-native v0.?.? 0.44.0\r\n\r\n### Expected behaviour\r\n\r\nAbility to use some prop to selectively disable either control button (specifically to match the scrollEnabled={false} use case).\r\n\r\n\r\n### Actual behaviour\r\n\r\nCannot disable either control button by any means.\r\n\r\n### How to reproduce it>\r\n\r\nTo help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.\r\n\r\n```\r\n<Swiper\r\n        showsButtons\r\n        nextButton={<TouchableOpacity style={{ zIndex: 1 }} disabled><Image source=\r\n                             {nextButtonImage} /></TouchableOpacity>}\r\n        prevButton={<Image source={prevButtonImage} style={{ alignItems: 'center' }} />}\r\n        scrollEnabled={false}\r\n        loop={false}\r\n      >\r\n        <ComponentWithDisabledButtonUntilSomeConditionIsMet />\r\n        <Component 2 />\r\n</Swiper>\r\n```\r\n### Steps to reproduce\r\n\r\n1. Create a basic swiper and a couple basic slides to test\r\n2. Initially disable scrolling for the swiper\r\n3. Attempt to match the control buttons to this behavior by disabling the forward button\r\n\r\n### My Use Case\r\n\r\nBasically, I have a slide in a swiper where the user can only proceed to the next slide if they meet a certain condition, so I need to selectively disable the nextButton.\r\n\r\nI can see in the source code that the reason the code above to reproduce doesn't work is because the custom element you pass in becomes wrapped in a touchable which you cannot modify to disable, so I'm happy to PR a quick new prop if you'd like :)"}}
{"actor":{"display_login":"arribbar"}}