-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2]How do I add a menubuffer by version2 ? #2965
Comments
For now, I can think a way is to scroll up by myself... |
I have done a spike for this one. I think the components api can't resolve this issue. If I want add a gap between menu and the viewport, I need to add a margin or padding. If I add padding, it will add white space in the menu container. But it will not include the margin! https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements So I think the best way to address this issue is providing the menuBuffer api. I will create a PR. If there is another good solution, I will close the PR. |
@wszgxa I think you can you achieve the same result using the components API, something like: import { components } from 'react-select';
const MyMenu = (props) => (
<div style={{ paddingBottom: 76 }}>
<components.Menu {...props} />
</div>
); Does that work for you? |
Okay, I see. It's a bit different to most of the primitives. |
Hi, @jossmac @gwyneplaine I have seen your comment on the PR.
Yep, it's bad smell. Option 1:Change
👍 Will be more clear for the relationship between Option 2:
So we can use the components and styles API to add margin to Which one do you prefer ? |
Hi, friend Do you have the plan to release a version for this 2.0.1? 😆 |
Hi, mate Any chance to have a beta release or minimum version release? This the last issue we don't want to fix by us... |
I don't have release permissions; need sign off from @JedWatson / @gwyneplaine |
I am upgrading the react-select to v2 in our project.
In v1 I have used
menuBuffer
to make menu scroll extra 76px when you open the menu. Because there is a button in bottom, it'sposition: absolute
. If I don't do that, the bottom button will hide the scroll menu.For now, The upgrading doc suggest to
use the new Components API
, I have tried that. Not work..The version I used is 2.0.0.
The text was updated successfully, but these errors were encountered: