Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full height #71

Open
euvpszcz opened this issue Nov 18, 2021 · 3 comments
Open

Full height #71

euvpszcz opened this issue Nov 18, 2021 · 3 comments

Comments

@euvpszcz
Copy link

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

@vmvillamilp
Copy link

vmvillamilp commented Jan 24, 2022

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!

@Abramovick
Copy link

Abramovick commented Jan 25, 2022

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

@vmvillamilp
Copy link

That's it. Good Job Abramovick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants