picker
picker copied to clipboard
The extra margin from the scroll component
I have been adapting this component in my modal but I find that there are extra margin exist. Anyway I can make the options are align to the top? Thank you
This is how my code written `const ScorePicker: React.FunctionComponent<ScorePicker> = ({ handleOnChange, selectedIndex }) => { const { winOptions } = useCalculationUtil()
return (
<View /* style={{display: "flex", flexDirection: "column", justifyContent:"flex-start"}} */>
<CalculationText>番數</CalculationText>
<PickerIOS
style={{ width: 100, borderWidth: 3, borderColor: "red", }}
itemStyle={{ fontSize: 12 }}
selectedValue={selectedIndex}
onValueChange={handleOnChange}
>
{winOptions.map((data, index) => {
return (
<PickerIOS.Item key={`score-option-${index}`} label={data.label} value={data.index} />
)
})}
</PickerIOS>
</View>
)
}`
ref image: https://imgur.com/a/etBCQ1d
I think you have to set the height of the itemStyle property