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

251
Visualizações
Tabulator duplicated record when using grouping column header

I use the example from the website to test the column group but it will duplicate the row record is tabulator does not support col group with HTML element ? Once I remove the col group , it will become normal thank you The test result image

My code:

   <table id="example-table">
   <thead>
        <tr>
            <th >Name</th>
            <th >Age</th>
            <th>Gender</th>
            <th>Height</th>
            <th>Driver</th>
            <th>favouritecolor</th>
            <th>dob</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Billy Bob</td>
            <td>12</td>
            <td>male</td>
            <td>1</td>
            <td>yesdrive</td>
            <td>red</td>
            <td>22/04/1994</td>
        </tr>
        <tr>
            <td>Mary May</td>
            <td>1</td>
            <td>female</td>
            <td>2</td>
            <td>yesdrive</td>
            <td>blue</td>
            <td>14/05/1982</td>
        </tr>
    </tbody>
</table>

<script>
var table = new Tabulator("#example-table", {
    columnHeaderVertAlign:"bottom", //align header contents to bottom of cell

    columns:[
    {title:"Name", field:"name", width:160},
    {//create column group
        title:"Work Info",
        columns:[
        {title:"Age", field:"age"},
        {title:"Height", field:"height"},
        {title:"Driver", field:"driver"},
        ],
    },
    {//create column group
        title:"Personal Info",
        columns:[
        {title:"Gender", field:"gender"},
        {title:"favouritecolor", field:"favouritecolor"},
        {title:"dob", field:"dob"},
        ],
    },
    ],
});
 </script>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Tabulator can only support importing simple HTML Tables, as the documentation states:

Note: Tabulator can only parse simple tables. Tables using multiple header rows, colspan or rowspan attributes will cause the import to fail.

That being said you can easily add column groups to a Tabulator, you just need to define your table setup using a column definition object array instead.

Full details of how to setup a tables column definition can b found in the Columns Documentation

An example of column groups in action can be found in the Column Groups Example

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