Skip to content

doc: tanstack-table refactor pagination example code, and add sorting#748

Draft
acharlop wants to merge 7 commits into
47ng:nextfrom
acharlop:tanstack-table-docs
Draft

doc: tanstack-table refactor pagination example code, and add sorting#748
acharlop wants to merge 7 commits into
47ng:nextfrom
acharlop:tanstack-table-docs

Conversation

@acharlop

@acharlop acharlop commented Nov 8, 2024

Copy link
Copy Markdown

I'm working on this now for my own project so figured I'd help out and add documentation.

Please let me know if this is helpful and heading in the right direction and I'll continue to add the filtering and a playground.

@vercel

vercel Bot commented Nov 8, 2024

Copy link
Copy Markdown

@acharlop is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Nov 8, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 9:37pm

@franky47

franky47 commented Nov 8, 2024

Copy link
Copy Markdown
Member

Thanks!

The idea behind community parsers is to highlight how to leverage custom parsers to represent data structures in the URL in a nice way. One thing you could try is to format the URL to only show the id and direction, like ?sort=name.asc or ?sort=age:desc.

The playground is an interactive way of configuring the parsers, variables here could include:

  • The separator (., :, ~ would be good choices, making sure to encode any instance of it in the id)
  • The rendering of the direction: asc | desc, a | d, ^ | v

Does TanStack Table support sorting over multiple columns? Is this something we could support by combining it with parseAsArrayOf?

Comment thread packages/docs/content/docs/parsers/community/tanstack-table.mdx Outdated
@franky47 franky47 added documentation Improvements or additions to documentation parsers/community Related to community parsers labels Nov 13, 2024
@acharlop acharlop force-pushed the tanstack-table-docs branch from 3f961f9 to 870fb47 Compare November 30, 2024 21:30
@acharlop

Copy link
Copy Markdown
Author

@franky47 I've updated the pagination example with 2 different strategies, and if that works for you I'll do the same for the sorting as well.

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

Labels

documentation Improvements or additions to documentation parsers/community Related to community parsers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants