react-native-multi-selectbox icon indicating copy to clipboard operation
react-native-multi-selectbox copied to clipboard

Full height

Open euvpszcz opened this issue 2 years ago • 3 comments

Hi I like your component very much but I was looking to render "SelectBox" on full height is there any outOfTheBox property ? Redards, Przemek

euvpszcz avatar Nov 18 '21 12:11 euvpszcz

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!

vmvillamilp avatar Jan 24 '22 07:01 vmvillamilp

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%)

Abramovick avatar Jan 25 '22 12:01 Abramovick

That's it. Good Job Abramovick.

vmvillamilp avatar Jan 25 '22 12:01 vmvillamilp