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

244
Vistas
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 Respuestas
Responde la pregunta

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 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