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

Support optgroup for Picker #2214

Closed
briankwlin opened this issue Feb 1, 2022 · 2 comments
Closed

Support optgroup for Picker #2214

briankwlin opened this issue Feb 1, 2022 · 2 comments
Labels
enhancement Requires extension or creation of new React Native API project:react-native-web Issue associated with react-native-web

Comments

@briankwlin
Copy link

The current picker doesn't support categories/groups of options as part of its props. It would be great to have support for the native optgroup element as part of react-native-web, or if that's not possible, any alternative solution anyone can suggest. Thanks (:

image

@hoangvvo
Copy link

hoangvvo commented Feb 9, 2022

Imo, Picker component (https://reactnative.dev/docs/picker) is being deprecated by the React Native team so it might not be worth adding the support. https://github.com/react-native-picker/picker is currently the alternative.

Perhaps you can just use plain HTML select (possibly in a platform specific file .web.js)? Note that optgroup is not available on ReactNative anyway should you ever integrate the app to mobile.

@necolas necolas added the project:react-native-web Issue associated with react-native-web label Jul 2, 2022
@necolas necolas added the enhancement Requires extension or creation of new React Native API label Jul 19, 2022
@necolas
Copy link
Owner

necolas commented Apr 13, 2023

Yeah migrate away from Picker and use platform-file forking if needed. We have some plans to make web a first-class API in React Native, which will make a lot of these things easier to do react-native-community/discussions-and-proposals#496

@necolas necolas closed this as completed Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requires extension or creation of new React Native API project:react-native-web Issue associated with react-native-web
Projects
None yet
Development

No branches or pull requests

3 participants