-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
SimpleBar container width collapsed when used in absolutely positioned container #430
Comments
I have a same problem, i want to use simplebar to scroll through options in my dialog |
Same issue. |
Any progress on this issue ? |
I ran into this issue when attempting to apply SimpleBar to a Bootstrap dropdown menu. I was able to work around it by manually calculating and setting the width on the containing element, but I'd strongly prefer a CSS-based solution within the library. |
Fixed in latest version. |
I have changed the version of SimplerBar used in the example and i don't think that the behavior is now completely correct https://stackblitz.com/edit/react-ts-q9u8l4. The container isn't completely collapsed as it was before, but the width doesn't stretch properly to fit whole content. Is there something i'm missing? |
@Grsmto Is there any solution to this issue? |
it seems like the flex environment is broken again since 6.0.0, if a container element has width: min-content, SimpleBar does not allow the container to shrink back once it has got bigger, due to the width that has been set on the simplebar-placeholder |
Describe the bug
SimpleBar container width is collapsing when used in floating (
position: absolute
) container.To Reproduce
Use SimpleBar component within floating
div
Expected behavior
Please correct me if I'm wrong, but from my understanding it should behave same as regular
div
with nativeoverflow: hidden scroll
property (adjust width to width of child elements, based on hardcoded css value or based on content).Reproducible example
https://stackblitz.com/edit/react-ts-stdesm
Please check 2 boxes,
red
box is using native scroll,pink
box is using SimpleBar component.Your environment
The text was updated successfully, but these errors were encountered: