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

[Popover] style.overflow not overwritable #6022

Closed
Sharlaan opened this issue Jan 28, 2017 · 3 comments
Closed

[Popover] style.overflow not overwritable #6022

Sharlaan opened this issue Jan 28, 2017 · 3 comments
Labels
component: Popover The React component.

Comments

@Sharlaan
Copy link

Sharlaan commented Jan 28, 2017

For one of my projects, i use the Popover component with style.height set.

        <Popover
            open={this.state.isOpen}
            anchorEl={this.root}
            canAutoPosition={false}
            anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
            useLayerForClickAway={false}
            onRequestClose={this.handlePopoverClose}
            style={{
                overflowY: 'hidden !important',
                height: 370
            }}
        >

Problem: when i scroll down and inner <Menu/>'s height exceeds the <Popover/>'s, a scrollbar appears. Since i already have a scrollbar for my children, i want to hide this pesky Popover's scrollbar.

I tried adding the overflow-y: hidden !important shown in code above, but it doesnot work, the popover seems to always rerender with overflow-y: auto ....

Any solution please ?

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 2, 2017

I have dug a bit into the issue. The overflow-y: auto style is coming from the <PopoverAnimationDefault /> component.
Your best option right now is to implement your own animation component.
We could extend PopoverAnimationDefault to accept some overriding style properties.

@oliviertassinari oliviertassinari added the component: Popover The React component. label Feb 2, 2017
@Sharlaan
Copy link
Author

Sharlaan commented Feb 3, 2017

Hi @oliviertassinari

I actually chose another option, much more radical XD :

I replaced Menu with react-infinite, this fixed both the double containers issue, and this not-overridable overflowY. Simpler code as well.
I'll make a release of superSelectField soon.
Thanks for the insight on PopoverAnimation.

@oliviertassinari
Copy link
Member

Thanks for letting me know. I'm closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popover The React component.
Projects
None yet
Development

No branches or pull requests

2 participants