JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.55k stars 4.12k forks source link

Auto resize when removing multi selections. #1218

Closed lucasferronato closed 4 years ago

lucasferronato commented 8 years ago

Look at the distance between the react-select and the checkbox below: pt1

When you select lots of options both divs .Select-control and .Select are resized: pt2

When you remove those selections while the menu is closed it resizes only .Select-control div leaving a blank space between react-select and checkbox. pt3

Removing with menu open works fine. When you remove the last option it resizes correctly.

sunny-g commented 8 years ago

Giving the .Select-control the property height: auto; seems to work.

lucasferronato commented 8 years ago

@sunny-g yeah, it actually worked... thanks. (I thought I did tried this before but it seems i didn't)

mladen107 commented 7 years ago

What I did in my project was changing "display:table" implementation to "display:flex" and that fixed this issue. You have to update some children too to shrink and grow properly.

bladey commented 4 years ago

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues / pull requests.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you.