0

In my quest to customize React Native or NativeBase's Picker to allow headings between sections, I have figured out how to add arbitrary formatting/elements/components to individual Items.

But they are all still able to be selected or "picked".

Is there a way to mark an item to say that the user cannot select it?

hippietrail
  • 15,848
  • 18
  • 99
  • 158
  • RN picker does have an enable/disable prop but it's only for Android. You can check it out here: https://facebook.github.io/react-native/docs/picker.html#enabled – Ray Sep 16 '17 at 15:50
  • @Raymond: That prop seems to be for the entire Picker. I want to disable individual Items. Apologies if my question wording was unclear. – hippietrail Sep 17 '17 at 01:19
  • Hi @hippietrail did you find any solution for this? – Ahtesham Shah Jul 02 '20 at 04:53
  • @AhteshamShah: No I didn't. I decided that frameworks like RN were always going to have gaps compared to the native APIs like this. I think the usual answer would be to write a new picker or add the functionality to the existing picker's code. I haven't touched RN for a couple of years now. Good luck. – hippietrail Jul 02 '20 at 05:46

0 Answers0