lorenzofox3 / smart-table-website

documentation website for smart table
18 stars 91 forks source link

st-sort-default needs to have a non-empty value for ascending #19

Closed ianhd closed 9 years ago

ianhd commented 9 years ago

For default sorting, simply doing <th st-sort="myProperty" st-sort-default> will not sort the data by that column. If I do st-sort-default="reverse", that correctly sorts in reverse. As a fix, I tried doing st-sort-default="whatever" and that did the trick. It doesn't seem to matter what value is used, just as long as it's provided and it's not "reverse" for the default ascending order.

blaise-io commented 9 years ago

I concur, I had to look at the source code to see how this works and decided on st-sort-default="true".

It would be helpful to have this properly documented and/or fixed in the API.