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

108
Vistas
How to create an empty row after a specific index?

I am trying to create a table that gets its values from a JSON service. I want to create an empty row (or an empty <tr></tr>) after the 6th and 11th rows, but I cannot do it. How can I do it?

{altmanzscoring.titles.map((val, i) => (
    <tr>
        {val.title == "Altman Z' Puan-İmalatçı Firmalar" ? (
            <td style={{ color: '#007FB2', fontWeight: 'bold' }}>{val.title}</td>
        ) : val.title == "Altman Z' Puan-İmalat Harici Firmalar" && i != 13 ? (
            <td style={{ color: '#007FB2', fontWeight: 'bold' }}>{val.title}</td>
        ) : (
            <td>{val.title}</td>
        )}
        {val.values[0].value == 'Ortalama İflas Riski' ? (
            <td style={{ color: '#ebc634' }}>{val.values[0].value}</td>
        ) : val.values[0].value == 'Düşük İflas Riski' ? (
            <td style={{ color: '#47d14c' }}>{val.values[0].value}</td>
        ) : val.values[0].value == 'Düşük İflas Riski' ? (
            <td style={{ color: '#e63c41' }}>{val.values[0].value}</td>
        ) : (
            <td>{val.values[0].value}</td>
        )}
        {val.values[1].value == 'Ortalama İflas Riski' ? (
            <td style={{ color: '#ebc634' }}>{val.values[1].value}</td>
        ) : val.values[1].value == 'Düşük İflas Riski' ? (
            <td style={{ color: '#47d14c' }}>{val.values[1].value}</td>
        ) : val.values[1].value == 'Düşük İflas Riski' ? (
            <td style={{ color: '#e63c41' }}>{val.values[1].value}</td>
        ) : (
            <td>{val.values[1].value}</td>
        )}
    </tr>
))}

Note: i for index.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I wouldn't add an empty tr, but if you want, just test the index and if the index is a multiple of 5 that case render an additional empty row.

Alternatively you have these options:

  1. You could use the tr: nth-child(5n) {margin-cotton: 5px} css selector to add room between the rows.
  2. you can use multiple <tbody> tags (one for every group) and add space there
about 4 years ago · Juan Pablo Isaza Denunciar
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