Help with IOS dropdown for state (location) selection

Please provide the following:

  1. SDK Version: 41

  2. Platforms(Android/iOS/web/all): IOS

  3. Add the appropriate “Tag” based on what Expo library you have a question on.

    I am needing a solution to allow IOS users to select their state (where they live) from a dropdown. The Picker approach is fairly ugly on IOS (works like a charm on Android), so I looked into ActionSheetIOS. The issue there is, I don’t see a way to set a value for the selection – meaning, by default it simply lets me know the array location (IE: 4) but not the actual selected value (IE: TN). Without having to write some crazy If or switch statement that’s 50 values long, how have you addressed this issue within Expo? As a side note, this is a managed ap, so I need to avoid ejecting.

I’m assuming you feed it a list of values (states), so when you get the index back, the value is simply states[index], unless I’m missing something important.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.