-
-
Notifications
You must be signed in to change notification settings - Fork 922
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
SelectPicker is moving along with the Scroll #1498
Comments
You can set a <div src={containerRef}>
<SelectPicker container={()=>containerRef.current}/>
</div> |
Have the same issue on |
Hi @barmola, I'm closing this issue as it seems to have been resolved. Feel free to re-open if it's actually not. |
Just as a comment, the parent div should have |
Hello, I'm sorry to resurrect this, but the suggested solution doesn't work when the picker is used to select multiple items, for instance, TagPicker or CheckPicker. It works until the user clicks the first item, then if he scrolls before clicking the second item, the container follows the scroll just like the second item. I guess that it has something to do with re-rendering, but I'm not sure. Can someone with this? |
Hi @yurifw . |
Thanks for helping! |
You should use - const scrollContainer = createRef();
+ const scrollContainer = useRef(); |
So much time trying to solve this... Thanks a lot, worked perfctly! |
What version of rsuite are you using?
4.8.8
What version of React are you using?
17.0.1
What browser are you using?
Chrome, Firefox
Describe the Bug
SelectPicker Menu is moving up and down along with the Scroll
, Behaving like position:fixed
Expected Behavior
SelectPicker menu should stay relative to its toggle wrapper.
To Reproduce
The text was updated successfully, but these errors were encountered: