creativetimofficial / ct-impact-design-system-pro

Impact Design System PRO
https://demos.creative-tim.com/impact-design-system-pro/
3 stars 2 forks source link

[Feature Request] data attribute alternative for list.js sorting #13

Open smaddock opened 4 years ago

smaddock commented 4 years ago

What is your enhancement?

Sometimes there is no human-friendly information displayed in a cell that makes sense to key off of for sorting. Currently I'm having to add a hidden element to the DOM to wrap the sorting key, e.g. <td><span class="price d-none">1999</span>$1,999</td>. It would be nice if instead we could do something like <td class="price" data-sort-item="1999">$1,999</td> where it uses the data attribute if present otherwise falls back to the element contents.

zoltanszogyenyi commented 3 years ago

Hey @smaddock,

Thanks for the feature request. I'll add this to the to-do list for version 1.2.