react-native-multi-selectbox
react-native-multi-selectbox copied to clipboard
Full height
Hi I like your component very much but I was looking to render "SelectBox" on full height is there any outOfTheBox property ? Redards, Przemek
Hi I like your component very much but I was looking to render "SelectBox" on full height is there any outOfTheBox property ? Redards, Przemek
Hi euvpszcz. I went to the index.js of the project and found out that there is a line which controlls the width and height of the component:
- const kOptionsHeight = { width: '100%', maxHeight: 180 }
Try modifying it for:
- const kOptionsHeight = { width: '100%', maxHeight: '100%' }
It should work just fine. Maybe in a future we can change kOptionsHeight as a parameter.
Regards!
You can dynamically set the height by setting it on the listOptionProps
like this.
<SelectBox
// ... other props
listOptionProps={{
style: { maxHeight: 500 },
}}
/>
In this example i set it to 500
but you can set it to whatever (in your case 100%
)
That's it. Good Job Abramovick.