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

Correct usage of scrolling in flex/grid container? #17

Open
molzahn-sio opened this issue Jul 4, 2019 · 4 comments
Open

Correct usage of scrolling in flex/grid container? #17

molzahn-sio opened this issue Jul 4, 2019 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@molzahn-sio
Copy link

I'm having trouble to get scrolling within nested containers to work properly and I hope that you can point me in the right direction.

Description:

  • My layout is created using a CSS grid without having any exact width/height values (responsive)
  • One of the fields is completely filled by a reactstrap Card component C
  • C contains the actual list L which manages/includes the movable list entries

A simplified example can be found here: https://codesandbox.io/s/snowy-glitter-mwibr
(With explicit size for display of the main container)

Question:
Given these circumstances I seem to be unable to get scrolling to work:

  • As far as I know I need to set overflow on C due to limitations regarding overflow scrolling within flex/grid layouts when not setting width/heights explicitly. But if I do that, react-movable doesn't seem to be able to pick up the scrolling necessities (see previous example)

  • I also tried to include C within L.renderList which solves the scrolling issue but when I try to drag an item the whole list is displayed as movable object --> https://codesandbox.io/s/icy-fire-s3g2r

  • The last thing I tried was setting overflow on L directly but then overflow is not working at all --> https://codesandbox.io/s/youthful-kalam-xowyt

Any help regarding the correct practice would be much appreciated as I really enjoy this simple to use but effective package!

Thanks.

@tajo tajo added the help wanted Extra attention is needed label Aug 18, 2019
@derianpt
Copy link

@ralmo Did you ever get around to solving this? I'm facing the same problem

@molzahn-sio
Copy link
Author

molzahn-sio commented Sep 16, 2020

No, not really. A lot has changed and I didn't make use of movable containers at all since then (priorities have shifted).

@dzsodzso63
Copy link

I have the same problem. I think the best solution would be to have a prop where we explicitly can set the scrolling container element?

@mmukhin
Copy link

mmukhin commented May 2, 2022

I was facing the same issue, and I put the "overflow" styles on the renderList={<div style={{overflow_styles_go_here}}/>} instead of putting the styles on the parent element wrapping the <List/>. In my local env its working, but its a little too "scroll happy" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants