Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in sortData subRows #2541

Merged
merged 1 commit into from Jul 20, 2020
Merged

Fix bug in sortData subRows #2541

merged 1 commit into from Jul 20, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 16, 2020

Fix sort subRows stop recursion when subRows length is one.
If row.subRows length is one, the subRows of row.subRows[0] will not sort in recursion

Fix sort subRows stop recursion when subRows length is one.
If row.subRows length is one, the subRows of row.subRows[0] will not sort in recursion
@vercel
Copy link

vercel bot commented Jul 16, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-table/5639bc7uw
✅ Preview: https://react-table-git-fork-leyinetwork-master.tannerlinsley.vercel.app

@tannerlinsley
Copy link
Collaborator

Why would you need to sort a single row?

@ghost
Copy link
Author

ghost commented Jul 17, 2020

Because I want to sort subRows data in recursion. If I have data[n].subRows[0].subRows[0].subRows[0] data set and data[0].subRows length is one, I can't sort the data in data[n].subRows[0] and subRows of the data in data[n].subRows[0]

You can find the case in https://codesandbox.io/embed/boring-sanne-d56h1?fontsize=14&hidenavigation=1&theme=dark
screencapture-codesandbox-io-s-boring-sanne-d56h1-1594966062664
@tannerlinsley

@ghost
Copy link
Author

ghost commented Jul 20, 2020

@tannerlinsley Can you take a look?

@tannerlinsley
Copy link
Collaborator

Ah. I see. Good find.

@tannerlinsley tannerlinsley merged commit 9676c8f into TanStack:master Jul 20, 2020
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 7.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant