Tablesorter colspan weirdness

0

So I have a table with the last column being a colspan=3. When the filter row is generated, it only creates one column with a colspan=1. I am not seeing a way to force this to create the filter row with colspan=3?

What I have:

<table id="myTableFilter" class="table table-bordered table-striped">
<thead>
  <tr>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>4</th>
    <th>5</th>
    <th>6</th>
    <th>7</th>
    <th colspan="3" class="filter-false"></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Contents 1</td>
    <td>Contents 2</td>
    <td>Contents 3</td>
    <td>Contents 4</td>
    <td>Contents 5</td>
    <td>Contents 6</td>
    <td>Contents 7</td>
    <td>Show</td>
    <td>Edit</td>
    <td>Delete</td>
  </tr>
</tbody>

What is rendered:

<tr role="row" class="tablesorter-filter-row hideme">
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="0"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="1"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="2"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="3"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="4"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="5"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter" data-column="6"></td>
    <td><input type="search" placeholder="" class="tablesorter-filter disabled" data-column="7" disabled=""></td>
</tr>

I am not seeing any straight forward way to make the last TD in the filter row colspan as the header does. Am I missing it, or do you have any ideas? I would like it to either generate a td for every th (Including the colspan) or hide that last td in the filter row all together.

Link: Tablesorter colspan weirdness
Source: Stack Jquery

Share.

About Author

Leave A Reply