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

defaultSort doesn't update on componentWillReceiveProps #390

Description

@michellethomas

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions