Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

defaultSort doesn't update on componentWillReceiveProps #390

Open
michellethomas opened this issue Oct 11, 2017 · 0 comments
Open

defaultSort doesn't update on componentWillReceiveProps #390

michellethomas opened this issue Oct 11, 2017 · 0 comments

Comments

@michellethomas
Copy link

michellethomas commented Oct 11, 2017

I'm noticing a problem, when I update the defaultSort and pass in a new column without refreshing the page the component doesn't update to sort on the new column.

In componentWillReceiveProps updateCurrentSort takes nextProps.sortBy instead of nextProps.defaultSort. defaultSort doesn't get updated outside of the constructor.

The README only mentions defaultSort, is there a reason for having both defaultSort and sortBy as props?

Even when I use sortBy the table doesn't correctly sort by the new column. Maybe setState here should be a functional set state?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant