fix(table-core): serialize array values as map keys in getFacetedUniq… · TanStack/table@11711ff · GitHub
Skip to content

Commit 11711ff

Browse files
committed
fix(table-core): serialize array values as map keys in getFacetedUniqueValues
Array cell values use reference equality in the Map, so two rows with identical array contents (e.g. ['a','b']) are counted as distinct entries instead of being aggregated. Serialize arrays with JSON.stringify before using them as map keys so equal-content arrays get the same bucket. Fixes #5405
1 parent 95c4768 commit 11711ff

2 files changed

Lines changed: 27 additions & 7 deletions

File tree

‎packages/table-core/src/features/column-faceting/createFacetedUniqueValues.ts‎

Lines changed: 3 additions & 2 deletions

‎packages/table-core/tests/unit/features/column-faceting/columnFacetingFeature.test.ts‎

Lines changed: 24 additions & 5 deletions

0 commit comments

Comments
 (0)