dandelion / dandelion-datatables

Dandelion component for DataTables
http://dandelion.github.io/components/datatables/
Other
110 stars 49 forks source link

sortInit not working when columns with display xls #282

Closed rnowif closed 9 years ago

rnowif commented 9 years ago

Hello,

When I mix xls displayed columns and html displayed columns, the sortInit attribute does not work.

<datatables:table id="myTableId" ...>
   <datatables:export type="xls" autoSize="true" cssClass="xlsLink" label="" />
   <datatables:column titleKey="firstName" display="xls">
   </datatables:column>
   <datatables:column titleKey="lastName" display="html" sortInit="asc" sortable="true">
   </datatables:column>
   <datatables:column titleKey="country" display="html" sortable="true">
   </datatables:column>
</datatables:table>

I expect the table to be initially sorted by lastName, but the datatable is sorted by country instead. I think it uses the index of the column to sort. The mix of xls and html columns seems to confuse the calculation.

Thank you for your time.

tduchateau commented 9 years ago

Thanks for reporting Renaud, I'll look into this

tduchateau commented 9 years ago

This has been fixed in the v1.0.0.