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

Body Scrollable Dialog #7438

Closed
everythingspirals opened this issue Jul 14, 2017 · 6 comments
Closed

Body Scrollable Dialog #7438

everythingspirals opened this issue Jul 14, 2017 · 6 comments
Assignees
Labels
component: dialog This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@everythingspirals
Copy link

everythingspirals commented Jul 14, 2017

Problem description

How can I make the Dialog scrollable in v1. I have a modal with a list in it, and the list goes off the page. I would like the ability to scroll down. I would like the scrollbar to be on the main browser window, rather than on the modal itself.

Link to minimal working code that reproduces the issue

Versions

  • Material-UI: 1
  • React:
  • Browser:
@oliviertassinari oliviertassinari added v1 component: dialog This is the name of the generic UI component, not the React module! labels Jul 15, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 15, 2017

That's an interesting issue! That behavior can be very handy when dealing with small height screen on mobile. Yes, it would be great to have this feature.

@oliviertassinari oliviertassinari added the new feature New feature or request label Jul 15, 2017
@quiaro
Copy link
Contributor

quiaro commented Jul 19, 2017

@everythingspirals I'm going to have a look at this. Let me know if you're already working on a fix for it.

@quiaro
Copy link
Contributor

quiaro commented Jul 25, 2017

Why not use a full screen dialog instead? It seems to work fine (except for a bug in the app bar)

fullscreen-dialog

@brammitch
Copy link

brammitch commented Jul 25, 2017

I'm using Dialogs with lists varying from 5-100 items, and initially had the same problem you did. Here's the configuration that allowed me to keep the Dialog and its list from going off the page:

<Dialog
	title="List of Things"
	actions={actions}
	modal={true}
	open={this.props.dialogOpen}
	autoDetectWindowHeight={true}
	autoScrollBodyContent={true}
	repositionOnUpdate={true}
	contentStyle={
		width: '90%',
		height: '90%'
	}
>
	<ListOfThings />
</Dialog>

The only difference from your request is that the scrollbar is in the modal, not the underlying page.

@dlcoffee
Copy link

I created an issue (#10656) that's similar to this. After browsing the other issues, I'm still not sure if this has solved or merged in yet. It seems like a lot of the solutions are focused on using a full screen on mobile. Ideally I'd like to be able to use a body-scrollable Dialog that works on all screens.

I guess one option is to use the full screen Dialog on the v1 branch but I don't really want to have the full screen on large screens.

@oliviertassinari oliviertassinari changed the title Scrollable Dialog Body Scrollable Dialog Mar 29, 2018
@n-sviridenko
Copy link

We are also interested in this feature (for desktop resolutions). Customer may not understand that dialog has a scroll (some browsers hide the scroll when there is no action) and hidden part will never appear. If the customer will scroll the window instead, the dialog's bottom part will be hidden behind the viewport so that it will be more obvious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dialog This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants