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

Re-enable table sorting by fixing UI in table-detail.vue #212

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JackWilb
Copy link
Member

Does this PR close any open issues?

Closes #57

Give a longer description of what this PR addresses and why it's needed

This PR fixes table sorting by not overwriting the original vuetify header, instead choosing to amend the text that the header displays. This allows the vuetify sorting hooks to be used and means we don't need to re-invent the wheel.

Provide pictures/videos of the behavior before and after these changes (optional)

Here's a photo of after the changes, note that the headers have their types (except _key, see TODOs) and that they have sorting icons. The sorting triggers an API call.
image

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • Make sorting work in multinetjs and in multinet-api. There doesn't seem to be a way to pass through sorting variables
  • See if _key is always missing or if it's just this one table
  • Check if this works with large tables

@netlify
Copy link

netlify bot commented Dec 14, 2021

✔️ Deploy Preview for next-multinet-client ready!

🔨 Explore the source changes: cf19d56

🔍 Inspect the deploy log: https://app.netlify.com/sites/next-multinet-client/deploys/61b927486c3daf00086cb95d

😎 Browse the preview: https://deploy-preview-212--next-multinet-client.netlify.app/

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

Successfully merging this pull request may close these issues.

Sorting the rows of a table by clicking the variable name in the header is broken
1 participant