Skip to content
New issue

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

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

Already on GitHub? # to your account

Add useTableSort hook #1682

Merged
merged 5 commits into from
Feb 12, 2025
Merged

Add useTableSort hook #1682

merged 5 commits into from
Feb 12, 2025

Conversation

phildarnowsky-broad
Copy link
Contributor

This takes some rendering and sorting logic that originated in the mitochondrial variant population frequency table and extracts it into a hook we can re-use in other functional components, such as the upcoming revisions to the short tandem repeats table.

Copy link
Contributor

@rileyhgrant rileyhgrant left a comment

Choose a reason for hiding this comment

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

LGTM!

Nice one, hopefully this can get reused in those Class Components you call out if/when they get reworked.

The logic copypasta'ed into these three tables is an older version of that which was just extracted into useTableSort. It's not possible to use hooks in a class component like these three, but we leave a note in these places reminding us to use useTableSort in case we convert them to functional components in the future.
@phildarnowsky-broad phildarnowsky-broad merged commit 0a4f2fd into main Feb 12, 2025
4 checks passed
@phildarnowsky-broad phildarnowsky-broad deleted the useTableSort branch February 12, 2025 15:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants