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

114
Views
Resumen de igual altura de detalles con React

¿Cómo establecer la altura de <summary> en un grupo de <Disclosure> s (lo que contiene los <details> ) al <summary> más alto del grupo usando un componente envolvente como <DisclosureGroup> ?

Puede encontrar un CodeSandbox para obtener el problema en detalle aquí: https://codesandbox.io/s/details-summary-equal-height-d6fh7

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No es lo ideal, pero aquí hay una forma de hacerlo. Básicamente si position: absolute; el <div> dentro de <details> entonces no ocupa espacio.

 section { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); } details div { position: absolute; } summary { box-sizing: border-box; height: 100%; padding: 20px; background: lightblue; }
 <main> <section> <details> <summary>First Title</summary> <div> <p>Whateva</p> </div> </details> <details> <summary>Very long title at the second disclosure to show the problem</summary> <div> <p> Whateva<br/> a<br/> b<br/> c<br/> d<br/> e<br/> f<br/> g<br/> h<br/> i<br/> j </p> </div> </details> <details> <summary>Third title not as long as the second</summary> <div> <p>Whateva</p> </div> </details> </section> </main>

about 4 years ago · Juan Pablo Isaza Report
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!