Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

270
Views
Reaccionar MUI: establecer una altura fija para el componente de diálogo

Estoy tratando de crear un cuadro de diálogo ( https://mui.com/components/dialogs/ ), he intentado configurar el valor sx minHeight, height, etc. pero cuando el cuadro de diálogo muestra, cambia la altura según lo que haya dentro.

¿Cómo puedo fijar la altura al 80% de la ventana y asegurarme de que no se encoja cuando hay menos contenido para llenar el espacio?

 <Dialog onClose={handleClose} open={open} fullWidth={true} maxWidth="lg" sx={{ height: '80%' }}> <DialogTitle sx={{ m: 0, p: 2 }}> Search drft <IconButton aria-label="close" onClick={handleClose} sx={{ position: 'absolute', right: 8, top: 8, color: (theme) => theme.palette.grey[500], }} > <CloseIcon /> </IconButton> </DialogTitle> <DialogContent dividers> {/* <DialogTitle>Search drft</DialogTitle> */} <GlobalSearch /> </DialogContent> </Dialog>

Actualización: siguiendo algunos consejos de una pregunta diferente, realicé la siguiente actualización y el cuadro de diálogo ahora está fijo al 80% de altura, ¡sin importar qué tan alto sea el contenido!

 <Dialog PaperProps={{ sx: { minHeight: '80%', maxHeight: '80%' } }} {...other} >
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!