picker icon indicating copy to clipboard operation
picker copied to clipboard

The extra margin from the scroll component

Open tcf01 opened this issue 3 years ago • 1 comments

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

tcf01 avatar Apr 24 '22 14:04 tcf01

I think you have to set the height of the itemStyle property

spylefkaditis avatar Aug 24 '24 10:08 spylefkaditis