hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
969 stars 294 forks source link

How do I change dropdownContainer height? #733

Open TikshaK opened 6 months ago

TikshaK commented 6 months ago

How do I change dropdownContainer height, it is fixed and not changing.

Shivam-sys commented 5 months ago

To change dropdownContainer height, you need to change maxHeight using maxHeight prop. (in case you want height greater than the default i.e. 200 as mentioed here). After this, you can set custom height using dropDownContainerStyle prop

Example

<DropDownPicker 
    open={open}
    ...
    maxHeight={400}   // Now max height set from default to 400.
    dropDownContainerStyle={{
        height: 400, // if not provided it will be auto, it will max to maxHeight provided.
    }}
    ...
/>