react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

Set default sorting column and sorting direction while initializing

Open JosephGu opened this issue 10 years ago • 4 comments

Hi team,

I'd like to set a arrow up icon for specified column while initializing,(i.e., We can handle the sorting in the backend service, and just need to set the icons to the specified column)

How could I implement it?

JosephGu avatar Dec 01 '16 01:12 JosephGu

Hey, I've just made PR resolving this issue. I have some questions about this functionality:

  • should setting sort column and direction initially trigger onGridSort callback?
  • or maybe user should provide already sorted data?
  • shoud there be a check that column in sortColumn prop is sortable?

tdzienniak avatar Feb 08 '17 10:02 tdzienniak

Hi! In my case I'm using meteor to fetch a paginated list. Triggering onGridSort handler calls a subscription that sorts the data server side then publishes the paginated data back to the client. To get that subscription data I must use createContainer HOC.

In my scenario, it will be just cool to have those props to tweak them in my render function, so after subscription is ready, the render function should get the sort order and column and set that on the ReactDataGrid component because the data got sorted on the server.

Please merge this!

Thanks!

mgscreativa avatar Jul 19 '17 19:07 mgscreativa

Why version 3 doesn't contain it? plss merge it

GlebDolzhikov avatar Jan 12 '18 12:01 GlebDolzhikov

This feature has been added in #649

amanmahajan7 avatar Mar 24 '18 23:03 amanmahajan7