picker icon indicating copy to clipboard operation
picker copied to clipboard

Bug: Make height and width required in the style prop

Open ShivamJoker opened this issue 2 years ago • 3 comments

The picker doesn't work at all if we don't specify width and height, and there is no mention in the docs that we need to put it to make it work.

If we can have a default or height width or at least require it then it would be great for new devs cause I had to waste lot of minutes figuring it out.

ShivamJoker avatar May 12 '22 12:05 ShivamJoker

It is really right ,I spent much time to find this reason, Thanks.

Maria199714 avatar Mar 17 '23 13:03 Maria199714

Chiming in to agree with this

tempranova avatar Apr 25 '23 16:04 tempranova

Thats how i solve my problem.

<Picker
    placeholder={placeholder}
    selectedValue={value}
    onValueChange={setValue}
    mode='dropdown'
    style={{
        borderRadius: 5,
        fontSize: 12,
        transform: [
            { translateY: Platform.OS === "ios"? -8: -8 }, // Adjust this value to align the arrow and label
            // { translateX: -5 }, // Adjust this value to align the arrow and label
            {scaleY: .9},
            // {scaleX: 1},
        ]
    }}
    itemStyle ={{
        fontSize: 12,

    }}
    {...dropdownProps}
    >
        <Picker.Item label={placeholder} value={""} />
</Picker>

Also refresh the application once you change in transform property.

Osamasomy avatar May 21 '23 08:05 Osamasomy