question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Dialog] How to modify max width of dialog box?

See original GitHub issue

Currently I have the Dialog props set to:

 title="Dialog" 
              modal = {true}
              actions={standardActions}
              autoDetectWindowHeight={false} 
              autoScrollBodyContent={false}
              contentStyle={{width: 700}}
              ref="addNewDialog"

If I change contentStyle={{width: 700}} it will not widen. But if I change it to something really small, like 10 px, it works. Does anyone know how I can set it to a much bigger display?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

38reactions
msafrin3commented, Jun 17, 2020

add div after Dialog and put a size on in

                <Dialog
                    open={this.state.open}
                    onClose={this.handleClose}
                    aria-labelledby="alert-dialog-title"
                    aria-describedby="alert-dialog-description"
                    maxWidth="false"
                >
                    <div style={{width: 500}}>
                        <DialogTitle id="alert-dialog-title">{this.props.title}</DialogTitle>
                        <DialogContent>
                            <DialogContentText id="alert-dialog-description">
                                {this.props.message}
                            </DialogContentText>
                        </DialogContent>
                        <DialogActions>
                            <Button onClick={this.handleClose} color="primary" autoFocus>
                                Close
                            </Button>
                        </DialogActions>
                    </div>
                </Dialog>
19reactions
metalmatzecommented, Mar 2, 2017
<Dialog
title="Dialog" 
modal = {true}
actions={standardActions}
autoDetectWindowHeight={false} 
autoScrollBodyContent={false}
style={{width: 700}}
ref="addNewDialog">

Use style instead of contentStyle?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dialog width material-ui next - Stack Overflow
Add two props fullWidth and maxWidth="md" in your Dialog component ... You can change md to sm , xs , lg and xl...
Read more >
[Dialog] How to modify max width of dialog box? #1467 - GitHub
Currently I have the Dialog props set to: title="Dialog" modal = {true} actions={standardActions} autoDetectWindowHeight={false} ...
Read more >
How to Size and Position the MUI Dialog Component - Medium
We can change this by passing fixed positioning to the Paper component, once again passing sx to the Dialog's PaperProps . <Dialog PaperProps={{ ......
Read more >
Dialog API - Material UI - MUI
Determine the max-width of the dialog. The dialog width grows with the size of the screen. Set to false to disable maxWidth ....
Read more >
jQuery UI Dialog maxWidth Option - GeeksforGeeks
The jQuery UI Dialog maxWidth option is used to set the maximum width to which the dialog can be resized in pixels. Syntax:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found