react-native-segment-controller icon indicating copy to clipboard operation
react-native-segment-controller copied to clipboard

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

Open aseem1992 opened this issue 6 years ago • 2 comments

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, }} />

aseem1992 avatar Jul 03 '18 07:07 aseem1992

What do you mean by "user interaction"?

csath avatar Oct 05 '18 13:10 csath

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

csath avatar Jan 07 '20 06:01 csath