bencripps / react-redux-grid

A React Grid/Tree Component written in the Redux Pattern
http://react-redux-grid.herokuapp.com/
MIT License
446 stars 63 forks source link

Assigning a property of sortable: true and defaultSortDirection: ASC|DESC does not sort the table by default #211

Open DJCecil2 opened 6 years ago

DJCecil2 commented 6 years ago

I'm attempting to sort a table by a value of "Last Modified" by default but it doesn't seem to work.

{
    dataIndex: 'updated_at',
    name: 'Last Updated',
    sortable: true,
    defaultSortDirection: 'ASC',
    renderer: ({ column, value }) => {
        return <DateTime key='much-unique' dateTime={value} />
    }
}

It places the sort icon (also not working, but probably a font issue), but it doesn't seem to be actually sorting anything (the default order still persists)

image

I can't find any documentation that states how to properly do this. What am I doing wrong?

baloraki commented 4 years ago

Hi, has anyone found a solution?