Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FrankEBailey opened this issue Dec 19, 2019 · 3 comments
Open

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

FrankEBailey opened this issue Dec 19, 2019 · 3 comments

Comments

@FrankEBailey
Copy link

FrankEBailey commented Dec 19, 2019

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.

@drvic10k
Copy link
Owner

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

@FrankEBailey
Copy link
Author

FrankEBailey commented Dec 19, 2019

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
Copy link
Author

Any further ideas on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants