bootstrap-sortable icon indicating copy to clipboard operation
bootstrap-sortable copied to clipboard

data-value doesn't sort if td contents is a <select>

Open FrankEBailey opened this issue 5 years ago • 3 comments

Hi, I add a data-value attribute to my table cell that contains a dropdown select with supplier names in it, this data-value being the supplier name that's currently selected in the application for that line. When I click on the column header, no sorting happens, even though the asc/desc arrows do change for the column.

FrankEBailey avatar Dec 19 '19 10:12 FrankEBailey

are you updating the attribute everytime the dropdown value is changed?

drvic10k avatar Dec 19 '19 10:12 drvic10k

I'm don't expect the table to sort if I've updated the value, just the initial values on page load. No sorting is occurring at all on clicking on the column header. When I click, the column header th, all the row td's get the sorted class, however the table rows aren't getting sorted at all.

A snippet of the relevant cell from one of my table rows:

<td data-value="Studio256 Parts">
<select name="Supplier_1" id="Supplier_1" class="form-control selSupplier" style="padding:2px;">
    <option value="">...</option>
    <option value="-1" >STOCK</option>
    <option  data-supplier="893" data-type="" value="893">AAD Commercial Parts</option>
    <option value="..." >etc ...</option>
</select>
</td>

FrankEBailey avatar Dec 19 '19 11:12 FrankEBailey

Any further ideas on this?

FrankEBailey avatar Jul 16 '20 14:07 FrankEBailey