Unable to access Map entries with array keys by value in getFacetedUniqueValues function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 3.6k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
TanStack Table version
8.12.0
Framework/Library version
NextJS v14.0.4
Describe the bug and the steps to reproduce it
I've encountered an issue when using the getFacetedUniqueValues function to retrieve the faceted unique values for a column in a table. The problem arises when the column value is an array and I attempt to access the corresponding facet using the array value as the key.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/tanstack-table-stfatx?file=src%2Fmain.tsx
Screenshots or Videos (Optional)
Status: Shows the number of entries for each option
Labels: Nothing due to it being an array
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction, especially src/main.tsx, and inspect how getFacetedUniqueValues is used when a column value is an array. Reproduce the lookup and compare the displayed statuses and labels. Done means array-valued facets can be accessed by value and their labels render correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100