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

Slider popover in hidden overflow div #6765

Open
JvH-json opened this issue Apr 12, 2024 · 1 comment
Open

Slider popover in hidden overflow div #6765

JvH-json opened this issue Apr 12, 2024 · 1 comment

Comments

@JvH-json
Copy link

Environment

  • Package version(s): Blueprint 4 (issue exists on 5 as well)
  • Browser and OS versions: Chrome

Question

We have a case where we need a blueprint slider within a div. This div needs to have the overflow-x: hidden property.
The min and max values of the slider can be arbitrarily large. The width of the slider, however, needs to remain consistent regardless of the min and max values.
With very large numbers, both the axis labels and the popover containing the value of the slider overflows outside of the div it is in. (In the screenshot the min and max are -1,000,000 and 1,000,000 respectively)

Bildschirmfoto 2024-04-12 um 09 23 54

We have a workaround that moves the min and max label to within the bounds of the div, but we are unable to find a solution that works for the popover.

Is there any built-in functionality or workaround that can be suggested to either:

  • Allow the popover of the slider pop out above the overflowing div
  • As soon as the popover is about to leave the bounds of the div that it sticks and expands towards the center of the div

Here is a sandbox to hopefully better illustrate the issue:
https://codesandbox.io/p/sandbox/constrained-blueprint-slider-l42kx6

@invliD
Copy link
Member

invliD commented Apr 26, 2024

I believe a decent solution would be to (optionally?) use a portal for the slider labels, so that it is rendered outside of its container. We would accept a contribution to fix this issue.

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

No branches or pull requests

2 participants