Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable user interaction for react-native-segment-controller. #2

Open
aseem1992 opened this issue Jul 3, 2018 · 2 comments
Open

Comments

@aseem1992
Copy link

Do we have something like "enabled={false}" to disable user interaction.
<SegmentedControlTab
values={['OPTION 1', 'OPTION 2',]}
enabled={false}
selectedIndex={this.state.selectedIndex}
onTabPress={this.handleIndexChange}
tabStyle={{ backgroundColor: 'white',marginTop: Platform.OS === 'ios' ? 15 : 10,borderColor: 'rgb(48,140,247)',height: 50,}}
borderRadius={30}
tabTextStyle={{ fontSize: 15,textAlign: 'left',color: 'rgb(48,140,247)',fontWeight: '500',marginBottom: 5, }}
/>

@csath
Copy link
Owner

csath commented Oct 5, 2018

What do you mean by "user interaction"?

@csath
Copy link
Owner

csath commented Jan 7, 2020

As long as you don't handle onTabPress callback and change the selectedIndex prop value, you can skip user interaction with the segment controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants