Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

109
Vistas
Truncate String & Add Dots If overflowing

I'm trying to build a list with items containing meeting-information such as name, location, and date. one issue I'm coming up within REACT is that I would need a way to determine whether the string should add "..." to the meeting name where its truncated (if overflowing its container). The items are built with divs and p's and placed in a grid.

The only solution I've come up with is to create a lot of hidden <div> containing the subject enter image description here name and then slicing it repeatedly until the string and three dots would fit the container.

As per the below picture, I would like for the string to be "NIKEM SALES AND MARKET...".

below is the css i use at the moment for the cell:

.main-info {
    grid-area: main-info;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

image of meeting-item

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda