Envoc / envoc.directives

7 stars 1 forks source link

Add ability to specify default sort column and direction #7

Closed rschroeder closed 10 years ago

justinobney commented 10 years ago

should this be a config setting? Do you have a proposed structure?

rschroeder commented 10 years ago

Just basing this off the datatables config:

viewModel.config = {
  order: [[ 2, "desc" ]]
};

I'm thinking for local datasource you could also just specify the property name instead of the index.

viewModel.config = {
  order: [[ "firstName", "desc" ]]
};
rschroeder commented 10 years ago

I think the datatables parser requires the index which you don't know until after the first load, right?

justinobney commented 10 years ago

Ahh I think you are correct.