aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 137 forks source link

Multiple column sort #213

Open bryankennedy opened 9 years ago

bryankennedy commented 9 years ago

Is there any way to do a multiple column sort as the default sort?

I imagine I could probably do this sort in the Mongo publication to the client. I'm just wondering if there's a way to define two columns for sorting within the reactive table settings.

aslagle commented 9 years ago

No, sorry. The sort settings only work with one column.

bryankennedy commented 9 years ago

Thanks for the quick response. I might look into hacking together something in the next few months. This is a medium level want for a project I'm working on. Open to PRs?

jasonxeno commented 9 years ago

@bryankennedy I would love that feature!

aslagle commented 9 years ago

Sure, it would be useful :)

aslagle commented 9 years ago

I just added a sortOrder option to fields in version 0.8.0 to replace the sort option. You can set it to a positive number on as many columns as you want, and it will sort starting from the lowest sortOrder column.