T
TanStack•2y ago
foreign-sapphire

Custom GetFacetedRowModel/getFacetedUniqueValues

Hey TanStack champs, I have a table that has objects as cell values ( eg. url to render Avatars) because i have not only string/numbers, my js-objects are not correctly recognized as unique (enclosed screenshot of the facets, from (const facets = column?.getFacetedUniqueValues())) This is probably a more niche requirement, but how can i adjusted the FacetedRowModel and/or getFacetedUniqueValues to achieve correct faceting and Filtering My goal would be a function that assumes each cell has {id: number, value: string) and use the object.id for faceting and filtering šŸ‘¶
1 Reply
foreign-sapphire
foreign-sapphireOP•2y ago
I will now flatten the objects (much more invisible columns) but i think this should be possible by writing a custom getfacetedRowModel (which is a bit outside my capabilities)

Did you find this page helpful?