If you use the complex header and color order together, an error occurs. Is there a solution?

If you use the complex header and color order together, an error occurs. Is there a solution?

chitachita Posts: 33Questions: 12Answers: 2
edited September 2023 in Free community support
<template>
<DataTable
  :columns="columns"
  :data="data"
  :options="options"
  ref="table"
  id="example"
  class="display nowrap"
  style="width: 100%"
 >
     <thead>
     <tr>
       <th rowspan="2"></th>
       <th rowspan="2"></th>
       <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
      <th rowspan="2"></th>
     <th colspan="5" style="text-align: center;">소유자 정보</th>
   </tr>
   <tr>
     <th></th>
     <th></th>
     <th></th>
     <th></th>
     <th></th>
  </tr>
</thead>
</DataTable>
</template>

When the colorReorder function is used together with the complex header as shown above, the error Uncaught TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node' will occur and the colorReorder will not function normally. Is there a solution?
In this example, you have implemented this phenomenon.

This question has accepted answers - jump to:

Answers

  • chitachita Posts: 33Questions: 12Answers: 2
    edited September 2023

    Modified the example in more detail. Look at this example.

  • kthorngrenkthorngren Posts: 21,211Questions: 26Answers: 4,928
    Answer ✓

    I believe ColReorder with complex headers is still not supported. See this thread.

    Kevin

  • allanallan Posts: 63,290Questions: 1Answers: 10,428 Site admin
    Answer ✓

    That is correct. At this time there is no support for complex headers with ColReorder - sorry.

    That might change in future, and DataTables 2 will lay the groundwork for that, but there is obviously a lot of complicated cases whereby you might move groups of columns, or a grouped item out of a group etc. It isn't on the short term development plan.

    Allan

Sign In or Register to comment.