Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

109
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda