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

Override the useSortBy Method To Fix Sorting Issue [Issue - 2644] #2919

Merged
merged 3 commits into from
Jun 23, 2022
Merged

Override the useSortBy Method To Fix Sorting Issue [Issue - 2644] #2919

merged 3 commits into from
Jun 23, 2022

Conversation

sahilsuman933
Copy link
Contributor

Signed-off-by: sahilsuman933 [email protected]

Description
I added custom sorting method which sorts all the sub-sections length wise.

Before:

before.mp4

After:

after.mp4

This PR fixes #2644

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: sahilsuman933 <[email protected]>
@l5io
Copy link
Contributor

l5io commented Jun 16, 2022

🚀 Preview for commit 15b1610 at: https://62abb2effde57246f7fd9e53--layer5.netlify.app

Copy link
Contributor

@Nikhil-Ladha Nikhil-Ladha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be sorted based on length. The requirement is to have it sorted alphabetically. Check the useSortyBy function in react-table that might help.

@sahilsuman933
Copy link
Contributor Author

@Nikhil-Ladha I read about the useSortBy function in react-table and the only solution that I was able to come up was to override the predefined function.

There was one more solution but it would have required to build that table from ground up. That's why I prefered custom sort method. it was clean and simple.

@l5io
Copy link
Contributor

l5io commented Jun 17, 2022

🚀 Preview for commit 8ef6ab8 at: https://62ac18d69b668e0c3e76dfe6--layer5.netlify.app

@YashKamboj
Copy link
Contributor

@sahilsuman933 Please add a appropriate title for the pr

@sahilsuman933 sahilsuman933 changed the title Fixed Issue-2644 Override the useSortBy Method To Fix Sorting Issue [Issue - 2644] Jun 17, 2022
@sahilsuman933
Copy link
Contributor Author

@sahilsuman933 Please add a appropriate title for the pr

Done.

@l5io
Copy link
Contributor

l5io commented Jun 17, 2022

🚀 Preview for commit 8dbbfb2 at: https://62acf4dd81919333b1b30140--layer5.netlify.app

@sahilsuman933
Copy link
Contributor Author

@Nikhil-Ladha and @YashKamboj Could you please review this PR?

@leecalcote
Copy link
Member

Heads-up: @Nikhil-Ladha is taking a couple vacations and will be in and out over the next few weeks.

@sahilsuman933
Copy link
Contributor Author

Heads-up: @Nikhil-Ladha is taking a couple vacations and will be in and out over the next few weeks.

Okay. Meanwhile I will fix some other issues. Any issue suggestion lee which is moderate level and which is related to JS?

@leecalcote
Copy link
Member

@sahilsuman933 good of you to ask. Yes, I can describe one to you on this Monday’s Websites meeting, which is today (meeting details at https://meet.layer5.io)

@sahilsuman933
Copy link
Contributor Author

@sahilsuman933 good of you to ask. Yes, I can describe one to you on this Monday’s Websites meeting, which is today (meeting details at https://meet.layer5.io)

Okay. Thanks

@Nikhil-Ladha Nikhil-Ladha merged commit 475ee7c into layer5io:master Jun 23, 2022
@sahilsuman933 sahilsuman933 deleted the issue-2644 branch June 24, 2022 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Books] Data is not filtered correctly in the table on the service-mesh-patterns book page.
5 participants