Is your feature request related to a problem? Please describe.
react-native-web is a new tool for creating web apps from react-native code. It would be awesome if this library supported web as well.
Describe the solution you'd like
My thought would that there could be an index.web.js file that implements the web version of this functionality. My first stab at this would be something like this (in typescript):
export const Dropdown = (props: PickerProps) => {
const inputStyles = props.style && props.style.inputWeb
return (
<select
onChange={e =>
props.onValueChange(e.target.value, e.target.selectedIndex)
}
style={inputStyles}
>
<option disabled selected={!props.value} value="">Select an item...</option>
{props.items.map(item => {
return (
<option key={item.key} value={item.value} selected={props.value === item.value}>
{item.label}
</option>
)
})}
</select>
)
}
I would be happy to make a PR for this functionality if it's something that would be accepted.
Edit: I'm working on this snippet for an app that will see production usage, so I'll update here as I make changes to it.
sounds interesting - i'll need to do some reading up on react-native-web to familiarize myself with it so i can help qa the result and/or need assistance from others in the community who want to help.
i'd like to avoid typescript though as the rest of the library doesn't utilize it.
closing as this'll live on the feature request board.
handled by #316
Most helpful comment
sounds interesting - i'll need to do some reading up on react-native-web to familiarize myself with it so i can help qa the result and/or need assistance from others in the community who want to help.
i'd like to avoid typescript though as the rest of the library doesn't utilize it.